@@ -118,10 +118,15 @@ class IgnoreValidator {
118118 // TODO(brianwilkerson): Uncomment the code below after the unignorable
119119 // ignores in the Flutter code base have been cleaned up.
120120 // for (var unignorableName in unignorable) {
121- // var name = unignorableName.name;
122- // _errorReporter.reportErrorForOffset(WarningCode.UNIGNORABLE_IGNORE,
123- // unignorableName.offset, name.length, [name]);
124- // list.remove(unignorableName);
121+ // if (unignorableName is IgnoredDiagnosticName) {
122+ // var name = unignorableName.name;
123+ // _errorReporter.atOffset(
124+ // errorCode: WarningCode.UNIGNORABLE_IGNORE,
125+ // offset: unignorableName.offset,
126+ // length: name.length,
127+ // data: [name]);
128+ // list.remove(unignorableName);
129+ // }
125130 // }
126131 for (var ignoredElement in duplicated) {
127132 if (ignoredElement is IgnoredDiagnosticName ) {
@@ -151,7 +156,7 @@ class IgnoreValidator {
151156 // TODO(pq): find the right way to roll-out enablement and uncomment
152157 // https://github.com/dart-lang/sdk/issues/51214
153158 // for (var ignoredName in ignoredNames) {
154- // if (ignoredName is DiagnosticName ) {
159+ // if (ignoredName is IgnoredDiagnosticName ) {
155160 // var name = ignoredName.name;
156161 // var rule = Registry.ruleRegistry.getRule(name);
157162 // if (rule != null) {
@@ -162,22 +167,30 @@ class IgnoreValidator {
162167 // } else if (state is RemovedState) {
163168 // var replacedBy = state.replacedBy;
164169 // if (replacedBy != null) {
165- // _errorReporter.reportErrorForOffset(HintCode.REPLACED_LINT_USE,
166- // ignoredName.offset, name.length, [name, since, replacedBy]);
170+ // _errorReporter.atOffset(
171+ // errorCode: WarningCode.REPLACED_LINT_USE,
172+ // offset: ignoredName.offset,
173+ // length: name.length,
174+ // data: [name, since, replacedBy]);
167175 // continue;
168176 // } else {
169- // _errorReporter.reportErrorForOffset(HintCode.REMOVED_LINT_USE,
170- // ignoredName.offset, name.length, [name, since]);
177+ // _errorReporter.atOffset(
178+ // errorCode: WarningCode.REMOVED_LINT_USE,
179+ // offset: ignoredName.offset,
180+ // length: name.length,
181+ // data: [name, since]);
171182 // continue;
172183 // }
173184 // }
174185 // }
175- //
176- // TODO(brianwilkerson): Uncomment the code below after the unnecessary
177- // ignores in the Flutter code base have been cleaned up.
178- // _errorReporter.reportErrorForOffset(
179- // WarningCode.UNNECESSARY_IGNORE, ignoredName.offset, name.length,
180- // [name]);
186+
187+ // // TODO(brianwilkerson): Uncomment the code below after the unnecessary
188+ // // ignores in the Flutter code base have been cleaned up.
189+ // _errorReporter.atOffset(
190+ // errorCode: WarningCode.UNNECESSARY_IGNORE,
191+ // offset: ignoredName.offset,
192+ // length: name.length,
193+ // data: [name]);
181194 // }
182195 // }
183196 }
0 commit comments