Anteater class
High-level API for Anteater static analysis.
Provides simple, one-liner methods for common analysis operations. Handles resource management automatically.
Example:
// Analyze metrics with default thresholds
final report = await Anteater.analyzeMetrics('lib');
print(report);
// Analyze with custom thresholds
final report = await Anteater.analyzeMetrics(
'lib',
thresholds: MetricsThresholds(maxCyclomatic: 15),
);
// Run full project analysis
final result = await Anteater.analyze('lib');
print('Found ${result.errorCount} errors');
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
analyze(
String path) → Future< ProjectAnalysisResult> - Analyzes a project for diagnostics (errors, warnings, info).
-
analyzeFile(
String filePath, {MetricsThresholds thresholds = const MetricsThresholds()}) → Future< List< FunctionMetrics> > - Analyzes a single file for metrics.
-
analyzeMetrics(
String path, {MetricsThresholds thresholds = const MetricsThresholds()}) → Future< AggregatedReport> - Analyzes code metrics for a directory or file.