ServiceLocator class

Creates and wires every dependency used by Eagle Eye.

The ServiceLocator is the composition root of the application. It owns the shared helpers and exposes factory methods for the objects that are created per configuration or per analyzed file.

Constructors

ServiceLocator()
Creates a new ServiceLocator with all shared dependencies wired.

Properties

dartSourceLoader → DartSourceLoader
The loader used to read and parse Dart source files.
no setter
hashCode → int
The hash code for this object.
no setterinherited
outputRenderer → OutputRenderer
The renderer used to format detected violations.
no setter
regexHelper → RegexHelper
The helper used for regex-based pattern matching.
no setter
repository → EagleEyeRepository
The repository used to load the configuration and project files.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

createConfigValidator({CheckReporter? onCheck}) → EagleEyeConfigValidator
Creates a configuration validator.
createMatcher({required EagleEyeConfig config, CheckReporter? onCheck}) → EagleEyeMatcher
Creates a matcher for the given config.
createVisitor({required EagleEyeConfigItem configItem, required String filePath, required String applicationName, required CompilationUnit unit, required void errorCallback(Violation), CheckReporter? onCheck}) → EagleEyeVisitor
Creates a visitor that analyzes imports found in unit.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseCliOptions(List<String> args) → CliOptions
Parses the command-line args into CliOptions.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited