| Index: packages/analyzer/lib/src/services/lint.dart
|
| diff --git a/analyzer/lib/src/services/lint.dart b/packages/analyzer/lib/src/services/lint.dart
|
| similarity index 88%
|
| rename from analyzer/lib/src/services/lint.dart
|
| rename to packages/analyzer/lib/src/services/lint.dart
|
| index 9dd51a0e41319bdf55d7645305ae528d9a6fc415..5efc3eae5b4cfdef094b747c3fa4a547fb78fa0a 100644
|
| --- a/analyzer/lib/src/services/lint.dart
|
| +++ b/packages/analyzer/lib/src/services/lint.dart
|
| @@ -10,6 +10,11 @@ import 'package:analyzer/src/generated/error.dart';
|
| import 'package:analyzer/src/generated/source.dart';
|
| import 'package:analyzer/src/generated/visitors.dart';
|
|
|
| +/// A registry containing mappings of contexts to their associated configured
|
| +/// lints.
|
| +final Map<AnalysisContext, List<Linter>> lintRegistry =
|
| + <AnalysisContext, List<Linter>>{};
|
| +
|
| /// Implementers contribute lint warnings via the provided error [reporter].
|
| abstract class Linter {
|
| /// Used to report lint warnings.
|
| @@ -27,8 +32,8 @@ abstract class Linter {
|
| ///
|
| /// See [LintCode].
|
| class LintGenerator {
|
| -
|
| /// A global container for contributed linters.
|
| + @deprecated // Use lintRegistry.
|
| static final List<Linter> LINTERS = <Linter>[];
|
|
|
| final Iterable<CompilationUnit> _compilationUnits;
|
| @@ -37,7 +42,7 @@ class LintGenerator {
|
|
|
| LintGenerator(this._compilationUnits, this._errorListener,
|
| [Iterable<Linter> linters])
|
| - : _linters = linters != null ? linters : LINTERS;
|
| + : _linters = linters ?? LINTERS;
|
|
|
| void generate() {
|
| PerformanceStatistics.lint.makeCurrentWhile(() {
|
|
|