|
3 | 3 | // BSD-style license that can be found in the LICENSE file.
|
4 | 4 |
|
5 | 5 | import 'package:analysis_server/src/services/correction/bulk_fix_processor.dart';
|
6 |
| -import 'package:analysis_server/src/services/correction/dart/ignore_diagnostic.dart'; |
7 | 6 | import 'package:analysis_server/src/services/linter/lint_names.dart';
|
8 | 7 | import 'package:analysis_server_plugin/edit/dart/correction_producer.dart';
|
9 | 8 | import 'package:analysis_server_plugin/edit/fix/dart_fix_context.dart';
|
@@ -63,6 +62,10 @@ class FixProcessor {
|
63 | 62 | /// parsed results.
|
64 | 63 | static final Map<String, List<ProducerGenerator>> parseLintProducerMap = {};
|
65 | 64 |
|
| 65 | + /// A list of generators that are used to create correction producers that |
| 66 | + /// produce corrections that ignore diagnostics locally. |
| 67 | + static final List<ProducerGenerator> ignoreProducerGenerators = []; |
| 68 | + |
66 | 69 | final DartFixContext _fixContext;
|
67 | 70 |
|
68 | 71 | final List<Fix> fixes = <Fix>[];
|
@@ -152,12 +155,7 @@ class FixProcessor {
|
152 | 155 | if (errorCode is LintCode ||
|
153 | 156 | errorCode is HintCode ||
|
154 | 157 | errorCode is WarningCode) {
|
155 |
| - var generators = [ |
156 |
| - IgnoreDiagnosticOnLine.new, |
157 |
| - IgnoreDiagnosticInFile.new, |
158 |
| - IgnoreDiagnosticInAnalysisOptionsFile.new, |
159 |
| - ]; |
160 |
| - for (var generator in generators) { |
| 158 | + for (var generator in ignoreProducerGenerators) { |
161 | 159 | await compute(generator(context: context));
|
162 | 160 | }
|
163 | 161 | }
|
|
0 commit comments