dallow 0.2.1
dallow: ^0.2.1 copied to clipboard
Codebase intelligence for Dart and Flutter. Finds unreachable dead code, dependency drift, circular imports, duplicate blocks, and complexity hot spots.
dallow examples #
dallow is a command-line tool, so the examples below are invocations rather
than a Dart main(). Activate it once, then run it against any Dart or Flutter
package.
dart pub global activate dallow
Analyse a package #
Run every check against the current directory:
dallow analyze
…or point it at a path:
dallow analyze path/to/your/package
Run a single check #
dallow dead-code # reachability-based dead code
dallow deps # dependency hygiene (unused / missing / misplaced)
dallow circular # import cycles
dallow duplication # duplicated token blocks
dallow complexity # cyclomatic complexity + project health score
Gate a pull request #
Fail CI only on findings a branch introduces, ignoring the existing backlog:
dallow analyze . --changed-since origin/main --fail-on warning
Or adopt the gate on a dirty codebase with a baseline:
dallow analyze . --write-baseline .dallow-baseline.json # capture today's findings
dallow analyze . --baseline .dallow-baseline.json --fail-on warning
Scan a monorepo #
Analyse every member package (melos / pub-workspace / nested) in one run:
dallow analyze -r . --fail-on warning
Emit SARIF for code scanning #
dallow analyze . --format sarif > dallow.sarif
See the package README for the full flag reference, exit
codes, and inline dallow-ignore suppression.