anal
A pluggable static analysis framework for Dart and Flutter projects with an extensible runner, rule registry, and CLI.
0.3.8
lezli01/anal
What this package is like to depend on
Last release 2 months ago
29 May 2026
Too new to tell
only 1 release windows
Nearly every release is documented
notes for 9 of 9 stable releases
Nothing withdrawn
no release was ever pulled
2 months old
9 releases · first in 2026
9 releases in the last 12 months
see the full history below
Release timeline
9 releases · May 2026 to May 2026Releases
latest 9-
0.3.829 May 2026Release notes
Open source →0.3.8 (2026-05-29)
Features
- cli: add --list-rules option to print registered rules (fdcd0e4)
- cli: add --list-rules option to print registered rules (#31) (2761611)
- hardening unused functions (#35) (251e696)
- unused_function: exempt constructors of freezed-annotated classes (ff79b39)
- unused_function: exempt constructors of freezed-annotated classes (#34) (1ef7ca2)
- unused: suppress nested findings inside unused source files (c972e32)
- unused: suppress nested findings inside unused source files (#36) (4a84f2c)
Bug Fixes
- runner: exclude .dart_tool/ and build/ from analysis by default (b3973b3)
- runner: exclude .dart_tool/ and build/ from analysis by default (#33) (6456e5c)
- unused_function: exempt conditional-export and public-API members (fdd67eb)
- unused_function: exempt conditional-export/import branch targets (b7ad632)
- unused_function: exempt public members of public types outside lib/src/ (e9de657)
- unused_function: exempt supertype overrides without @override (dd40f83)
Release notes
Open source →Features
- cli: add --list-rules option to print registered rules (fdcd0e4)
- cli: add --list-rules option to print registered rules (#31) (2761611)
- hardening unused functions (#35) (251e696)
- unused_function: exempt constructors of freezed-annotated classes (ff79b39)
- unused_function: exempt constructors of freezed-annotated classes (#34) (1ef7ca2)
- unused: suppress nested findings inside unused source files (c972e32)
- unused: suppress nested findings inside unused source files (#36) (4a84f2c)
Bug Fixes
- runner: exclude .dart_tool/ and build/ from analysis by default (b3973b3)
- runner: exclude .dart_tool/ and build/ from analysis by default (#33) (6456e5c)
- unused_function: exempt conditional-export and public-API members (fdd67eb)
- unused_function: exempt conditional-export/import branch targets (b7ad632)
- unused_function: exempt public members of public types outside lib/src/ (e9de657)
- unused_function: exempt supertype overrides without @override (dd40f83)
-
0.3.728 May 2026Release notes
Open source →0.3.7 (2026-05-28)
Features
- better utilization coverage (#30) (1b86e8f)
- multi_file_analysis_context: add reportableFilePaths field (6189773)
- reporter: group ConsoleReporter output by file (8c4bba5)
- reporter: group ConsoleReporter output by file (#28) (1880d63)
- samples: exercise excluded-file references in samples (9f3301c)
- unused_function: only emit diagnostics for reportable files (2c6ee3e)
- unused_source_file: only flag reportable files (13ad2ee)
Release notes
Open source →Features
- better utilization coverage (#30) (1b86e8f)
- multi_file_analysis_context: add reportableFilePaths field (6189773)
- reporter: group ConsoleReporter output by file (8c4bba5)
- reporter: group ConsoleReporter output by file (#28) (1880d63)
- samples: exercise excluded-file references in samples (9f3301c)
- unused_function: only emit diagnostics for reportable files (2c6ee3e)
- unused_source_file: only flag reportable files (13ad2ee)
-
0.3.628 May 2026Release notes
Open source →0.3.6 (2026-05-28)
Features
- function analysis enhanced (#26) (b0538b9)
- unused_function: normalise generic member identity in reference tracking (c19c502)
- unused_function: record enum-value declarations as uses of the enum constructor (b592b78)
- unused_function: record implicit super-constructor invocation as a use (ee2a5c1)
- unused_function: treat overrides of reachable supertype members as uses (c9f3c0e)
- unused_function: walk supertype chain for noSuchMethod exemption (a85e7e2)
Bug Fixes
- unused_function: exempt flutter gen-l10n generated localization output (0c06c1f)
Release notes
Open source →Features
- function analysis enhanced (#26) (b0538b9)
- unused_function: normalise generic member identity in reference tracking (c19c502)
- unused_function: record enum-value declarations as uses of the enum constructor (b592b78)
- unused_function: record implicit super-constructor invocation as a use (ee2a5c1)
- unused_function: treat overrides of reachable supertype members as uses (c9f3c0e)
- unused_function: walk supertype chain for noSuchMethod exemption (a85e7e2)
Bug Fixes
- unused_function: exempt flutter gen-l10n generated localization output (0c06c1f)
-
0.3.528 May 2026Release notes
Open source →0.3.5 (2026-05-28)
Features
- dart awareness (#24) (a966836)
- unused_class: make rule Dart 3 feature-aware (bc6c086)
- unused_function: make rule feature-aware (0ac7537)
- unused_source_file: follow conditional and deferred import edges (7e1bc72)
- updated sample (#21) (9d3e5b2)
Bug Fixes
-
0.3.427 May 2026Release notes
Open source →0.3.4 (2026-05-27)
Features
- sample projects (#17) (f120a92)
- samples: add unused_source_file sample project (af01ba7)
- unused functions (#20) (9f79e99)
- unused_function: add collector for class, mixin, enum, and extension-type members (c5574f2)
- unused_function: add collector for extension declaration members (ffa728a)
- unused_function: add collector for top-level getters and setters (3d4d3e7)
- unused_function: flag unreferenced public top-level functions in lib/src/ (07703ce)
Bug Fixes
- analysis (ff4cf8c)
Release notes
Open source →Features
- sample projects (#17) (f120a92)
- samples: add unused_source_file sample project (af01ba7)
- unused functions (#20) (9f79e99)
- unused_function: add collector for class, mixin, enum, and extension-type members (c5574f2)
- unused_function: add collector for extension declaration members (ffa728a)
- unused_function: add collector for top-level getters and setters (3d4d3e7)
- unused_function: flag unreferenced public top-level functions in lib/src/ (07703ce)
Bug Fixes
- analysis (ff4cf8c)
-
0.3.327 May 2026 -
0.3.227 May 2026 -
0.3.027 May 2026Release notes
Open source →Added
- New default-on
unused_source_filerule. It flags Dart source files in the analyzed set that are never reached from any entry point via animport,export, orpartdirective. Entry points are files underbin/ortest/, files that declare a top-levelmain, andlib/<package>.dartplus any other file sitting directly underlib/(i.e. not nested insidelib/src/). Generated-file basenames such as*.g.dartand*.freezed.dartare skipped defensively even when the runner's default excludes are turned off. Diagnostics are emitted atSeverity.warning. The rule is registered by the built-in CLI and enabled automatically. Runningdart run lintforgeagainst a project that previously produced no diagnostics may now surface new warnings from this rule. - New
MultiFileAnalyzerRuleextension point for custom rules that need to reason across multiple files in a single invocation (for example to build an import graph or a cross-file symbol index). Multi-file rules are registered with the sameRuleRegistryasAnalyzerRuleimplementations and are dispatched once per run with the full set of resolved compilation units. ExistingAnalyzerRuleimplementations continue to be dispatched once per file and do not need any changes. - New
--no-default-excludesCLI flag that opts out of the built-in default exclude patterns. Pair it with explicit--excludeflags when you want full control over which paths are skipped. - New
LintforgeOptions.defaultExcludePathsconstant exposing the list of glob patterns excluded byLintforgeOptions.defaults(). Useful when composing customLintforgeOptionsinstances programmatically. - New default-on
unused_functionrule. It flags file-local function declarations that are never referenced, specifically private top-level functions in libraries that have nopartfiles and local function declarations inside another function or method body. Diagnostics are emitted atSeverity.warning. The rule is registered by the built-in CLI and enabled automatically. Runningdart run lintforgeagainst a project that previously produced no diagnostics may now surface new warnings from this rule. - New default-on
unused_classrule. It flags file-local declarations that are never referenced within the same compilation unit, coveringclass,mixin,enum, andextension typedeclarations whose names begin with_. The rule only runs against libraries that have nopartfiles and skips declarations annotated with@pragma('vm:entry-point'). Diagnostics are emitted atSeverity.warning. The rule is registered by the built-in CLI and enabled automatically. Runningdart run lintforgeagainst a project that previously produced no diagnostics may now surface new warnings from this rule. - Open-source project guidance, issue templates, pull request checklist, security policy, code of conduct, and Dependabot configuration.
- Coverage artifact upload to CI.
.pubignoreto keep automation and assistant-only files out of the published package archive..gitattributesfor predictable text file line endings.
Changed
- Updated CI and release automation to target the repository default branch.
- Tightened package metadata for pub.dev discovery.
- Widened the analyzer dependency to
>=9.0.0 <13.0.0so projects usingfreezed >=3.2.5can addlintforgewithout a version-solver conflict. - Default exclude patterns now include
*.g.dartand*.freezed.dart. Pass an emptyexcludePaths(or--no-default-excludeson the CLI) to opt out. --excludenow layers on top of the default excludes instead of replacing them. Patterns you pass are added to the built-in defaults; use--no-default-excludesif you need to suppress the defaults.
Fixed
- Fixed directory include discovery on Windows.
lintforgeis now installable alongsidefreezed ^3.2.5.dart run lintforge --versionnow prints the correct package version instead of the stale hardcoded0.1.0.- Restored analyzer 9.0.0 compatibility for the
unused_classrule. The rule previously reached intoExtensionTypeDeclaration.primaryConstructor, which only exists in analyzer 10+, causing a build break for consumers pinned to analyzer 9.0.0 ('primaryConstructor' isn't defined for the type 'ExtensionTypeDeclaration'). The rule now uses the cross-versionExtensionTypeDeclaration.nameaccessor. unused_classno longer crashes on analyzer 9.x/10.x. The rule previously readClassDeclaration.namePartandEnumDeclaration.namePart, which require the default-off experimental flaguseDeclaringConstructorsAst = trueand otherwise throwUnsupportedError, surfacing asRule unused_class threw during analysis: .... The rule now uses the always-availablenametoken on both nodes.
Commits
- New default-on
-
0.1.027 May 2026Release notes
Open source →- Added a pluggable static-analysis framework for Dart and Flutter projects:
AnalyzerRule: abstract plugin contract for custom rules.Diagnostic,Severity,SourceLocation: value types describing analysis findings.AnalysisContext: carrier passed into each rule invocation, exposing the resolved compilation unit.RuleRegistry: in-memory registration and lookup of rules, with duplicate-id rejection.AnalysisRunner: orchestrator that resolves target files, dispatches rules, and collects diagnostics.LintforgeOptions: value class describing include/exclude paths and enabled rule ids.Reporter/ConsoleReporter: pluggable diagnostic output, with a stdout implementation.- CLI executable
lintforge(dart run lintforge) with--help,--version,--rules, and--excludeflags.
BREAKING CHANGE
- Removed the
Calculatorstub that shipped in0.0.1. Consumers that depended on it must remove the import; it was a generator placeholder and not part of any intended public API.
- Added a pluggable static-analysis framework for Dart and Flutter projects: