lintforge library
LintForge is a pluggable static analysis framework for Dart and Flutter projects.
This library re-exports the package's public surface: the AnalyzerRule
extension point, the runner that drives it, the diagnostic value types,
and the configuration/reporting helpers. Implementation details live
under lib/src/ and are not part of the stable surface.
Classes
- AnalysisContext
-
Carrier passed into every
AnalyzerRule.analyzeinvocation. - AnalysisProgress
- An immutable snapshot of an in-progress analysis run.
- AnalysisRunner
- Orchestrator that walks the configured paths, parses each Dart file, and dispatches the registered AnalyzerRules against it.
- AnalyzerRule
- Extension point implemented by every analyzer rule.
- Ansi
- A palette of ANSI styles gated by a single enabled flag.
- ConsoleReporter
- A Reporter that writes a human-friendly, column-aligned report to an IOSink, grouped by file.
- Diagnostic
-
A finding produced by an
AnalyzerRulewhile analyzing a single file. - LintforgeOptions
- Immutable configuration for a single analysis run.
- MultiFileAnalysisContext
-
Carrier passed into every
MultiFileAnalyzerRule.analyzeinvocation. - MultiFileAnalyzerRule
- Extension point implemented by every cross-file analyzer rule.
- ProgressReporter
-
Draws a single, self-erasing progress line to an IOSink (typically
stderr) while a long-running analysis is in flight. - Reporter
- Presents a list of Diagnostics to some sink (console, file, IDE, ...).
- RuleRegistry
-
In-memory collection of AnalyzerRule instances keyed by
AnalyzerRule.id. - SourceLocation
- A location inside a Dart source file.
- UnusedClassRule
- Flags private class, mixin, enum, and extension-type declarations that are never referenced across the analyzed file set.
- UnusedFunctionRule
- Flags function-shaped declarations that are never referenced across the analyzed file set.
- UnusedSourceFileRule
- Flags Dart source files that are never reached from any entry point in the analyzed set.
Enums
- AnalysisPhase
-
The phase an
AnalysisRunneris currently executing when it emits a progress update. - ColorPreference
- A user's explicit color preference, typically parsed from a CLI flag.
- Severity
-
Severity of a Diagnostic emitted by an
AnalyzerRule.
Functions
-
resolveAnsi(
{required ColorPreference preference, required bool hasTerminal, required bool supportsAnsiEscapes, required Map< String, String> environment}) → Ansi - Convenience wrapper that resolves a ready-to-use Ansi palette from the same inputs as shouldEmitAnsi.
-
shouldEmitAnsi(
{required ColorPreference preference, required bool hasTerminal, required bool supportsAnsiEscapes, required Map< String, String> environment}) → bool -
Returns whether ANSI escape codes should be written, given a
preference, the target stream's capabilities (hasTerminal/supportsAnsiEscapes), and the processenvironment.