Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(968)

Unified Diff: pkg/analysis_server/lib/src/services/correction/fix_internal.dart

Issue 1770733002: Back out ignore quick-fix. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/lib/src/services/correction/fix_internal.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index 65a2b37cda1fc72e2e7a2c2a2bd70dce75e001f8..3fdd5f9a3db8a3b7a43e2afc1012365455acbf5e 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -143,15 +143,6 @@ class FixProcessor {
new NodeLocator2(errorOffset, errorEnd - 1).searchWithin(unit);
// analyze ErrorCode
ErrorCode errorCode = error.errorCode;
- // add ignore fix for ignorable errors.
- // note that this fix needs to be added before fixes that side-effect
- // the utils instance.
- if (errorCode is StaticWarningCode ||
- errorCode is StaticTypeWarningCode ||
- errorCode is HintCode ||
- errorCode is LintCode) {
- _addFix_ignore(errorCode);
- }
if (errorCode == StaticWarningCode.UNDEFINED_CLASS_BOOLEAN) {
_addFix_boolInsteadOfBoolean();
}
@@ -1392,18 +1383,6 @@ class FixProcessor {
}
}
- void _addFix_ignore(ErrorCode errorCode) {
- int offset = node.offset;
- int lineOffset = utils.getLineThis(offset);
-
- exitPosition = new Position(file, lineOffset - 1);
- String indent = utils.getLinePrefix(offset);
- String errorCodeName = errorCode.name.toLowerCase();
- String content = '$indent//ignore: $errorCodeName$eol';
- _addReplaceEdit(rf.rangeStartLength(lineOffset, 0), content);
- _addFix(DartFixKind.IGNORE_ERROR, [errorCodeName]);
- }
-
void _addFix_illegalAsyncReturnType() {
// prepare the existing type
TypeName typeName = node.getAncestor((n) => n is TypeName);
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix.dart ('k') | pkg/analysis_server/test/edit/fixes_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698