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

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

Issue 1736383002: Quick-fix for `annotate_overrides` lint (#25416). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/fix.dart b/pkg/analysis_server/lib/src/services/correction/fix.dart
index 7525b74f0f0b7155e1022a05d37ae6e79cdcf4fb..5a8331aa623b6aa5575dbb044b6b68fc3444be4f 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix.dart
@@ -46,8 +46,8 @@ Future<List<Fix>> computeFixes(
/**
* Return true if this [errorCode] is likely to have a fix associated with it.
*/
-bool hasFix(ErrorCode errorCode) => errorCode ==
- StaticWarningCode.UNDEFINED_CLASS_BOOLEAN ||
+bool hasFix(ErrorCode errorCode) =>
+ errorCode == StaticWarningCode.UNDEFINED_CLASS_BOOLEAN ||
errorCode == StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER ||
errorCode == StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS ||
errorCode == StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR ||
@@ -60,7 +60,8 @@ bool hasFix(ErrorCode errorCode) => errorCode ==
errorCode ==
StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR ||
errorCode ==
- StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS ||
+ StaticWarningCode
+ .NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS ||
errorCode == StaticWarningCode.CAST_TO_NON_TYPE ||
errorCode == StaticWarningCode.TYPE_TEST_WITH_UNDEFINED_NAME ||
errorCode == StaticWarningCode.UNDEFINED_CLASS ||
@@ -165,6 +166,8 @@ class DartFixKind {
const FixKind('IMPORT_LIBRARY_SHOW', 49, "Update library '{0}' import");
static const INSERT_SEMICOLON =
const FixKind('INSERT_SEMICOLON', 50, "Insert ';'");
+ static const LINT_ADD_OVERRIDE =
+ const FixKind('ADD_OVERRIDE', 50, "Add '@override' annotation");
scheglov 2016/02/26 22:17:20 Maybe use the same name as the constant name (LINT
pquitslund 2016/02/26 22:21:13 Done.
static const MAKE_CLASS_ABSTRACT =
const FixKind('MAKE_CLASS_ABSTRACT', 50, "Make class '{0}' abstract");
static const REMOVE_DEAD_CODE =

Powered by Google App Engine
This is Rietveld 408576698