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

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

Issue 1428903002: Mark HintCode.CAN_BE_NULL_AFTER_NULL_AWARE as fixable. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/correction/fix_internal.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analysis_server.src.services.correction.fix; 5 library analysis_server.src.services.correction.fix;
6 6
7 import 'package:analysis_server/plugin/edit/fix/fix_core.dart'; 7 import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
8 import 'package:analysis_server/src/plugin/server_plugin.dart'; 8 import 'package:analysis_server/src/plugin/server_plugin.dart';
9 import 'package:analyzer/file_system/file_system.dart'; 9 import 'package:analyzer/file_system/file_system.dart';
10 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS || 65 errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS ||
66 errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER || 66 errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER ||
67 errorCode == 67 errorCode ==
68 CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE || 68 CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE ||
69 errorCode == CompileTimeErrorCode.INVALID_ANNOTATION || 69 errorCode == CompileTimeErrorCode.INVALID_ANNOTATION ||
70 errorCode == CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT || 70 errorCode == CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT ||
71 errorCode == CompileTimeErrorCode.PART_OF_NON_PART || 71 errorCode == CompileTimeErrorCode.PART_OF_NON_PART ||
72 errorCode == 72 errorCode ==
73 CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT || 73 CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT ||
74 errorCode == CompileTimeErrorCode.URI_DOES_NOT_EXIST || 74 errorCode == CompileTimeErrorCode.URI_DOES_NOT_EXIST ||
75 errorCode == HintCode.CAN_BE_NULL_AFTER_NULL_AWARE ||
75 errorCode == HintCode.DEAD_CODE || 76 errorCode == HintCode.DEAD_CODE ||
76 errorCode == HintCode.DIVISION_OPTIMIZATION || 77 errorCode == HintCode.DIVISION_OPTIMIZATION ||
77 errorCode == HintCode.TYPE_CHECK_IS_NOT_NULL || 78 errorCode == HintCode.TYPE_CHECK_IS_NOT_NULL ||
78 errorCode == HintCode.TYPE_CHECK_IS_NULL || 79 errorCode == HintCode.TYPE_CHECK_IS_NULL ||
79 errorCode == HintCode.UNDEFINED_GETTER || 80 errorCode == HintCode.UNDEFINED_GETTER ||
80 errorCode == HintCode.UNDEFINED_SETTER || 81 errorCode == HintCode.UNDEFINED_SETTER ||
81 errorCode == HintCode.UNNECESSARY_CAST || 82 errorCode == HintCode.UNNECESSARY_CAST ||
82 errorCode == HintCode.UNUSED_CATCH_CLAUSE || 83 errorCode == HintCode.UNUSED_CATCH_CLAUSE ||
83 errorCode == HintCode.UNUSED_CATCH_STACK || 84 errorCode == HintCode.UNUSED_CATCH_STACK ||
84 errorCode == HintCode.UNUSED_IMPORT || 85 errorCode == HintCode.UNUSED_IMPORT ||
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 static const REMOVE_DEAD_CODE = 163 static const REMOVE_DEAD_CODE =
163 const FixKind('REMOVE_DEAD_CODE', 50, "Remove dead code"); 164 const FixKind('REMOVE_DEAD_CODE', 50, "Remove dead code");
164 static const REMOVE_PARAMETERS_IN_GETTER_DECLARATION = const FixKind( 165 static const REMOVE_PARAMETERS_IN_GETTER_DECLARATION = const FixKind(
165 'REMOVE_PARAMETERS_IN_GETTER_DECLARATION', 166 'REMOVE_PARAMETERS_IN_GETTER_DECLARATION',
166 50, 167 50,
167 "Remove parameters in getter declaration"); 168 "Remove parameters in getter declaration");
168 static const REMOVE_PARENTHESIS_IN_GETTER_INVOCATION = const FixKind( 169 static const REMOVE_PARENTHESIS_IN_GETTER_INVOCATION = const FixKind(
169 'REMOVE_PARENTHESIS_IN_GETTER_INVOCATION', 170 'REMOVE_PARENTHESIS_IN_GETTER_INVOCATION',
170 50, 171 50,
171 "Remove parentheses in getter invocation"); 172 "Remove parentheses in getter invocation");
172 static const REMOVE_UNNECASSARY_CAST = 173 static const REMOVE_UNNECESSARY_CAST =
173 const FixKind('REMOVE_UNNECASSARY_CAST', 50, "Remove unnecessary cast"); 174 const FixKind('REMOVE_UNNECESSARY_CAST', 50, "Remove unnecessary cast");
174 static const REMOVE_UNUSED_CATCH_CLAUSE = 175 static const REMOVE_UNUSED_CATCH_CLAUSE =
175 const FixKind('REMOVE_UNUSED_CATCH', 50, "Remove unused 'catch' clause"); 176 const FixKind('REMOVE_UNUSED_CATCH', 50, "Remove unused 'catch' clause");
176 static const REMOVE_UNUSED_CATCH_STACK = const FixKind( 177 static const REMOVE_UNUSED_CATCH_STACK = const FixKind(
177 'REMOVE_UNUSED_CATCH_STACK', 50, "Remove unused stack trace variable"); 178 'REMOVE_UNUSED_CATCH_STACK', 50, "Remove unused stack trace variable");
178 static const REMOVE_UNUSED_IMPORT = 179 static const REMOVE_UNUSED_IMPORT =
179 const FixKind('REMOVE_UNUSED_IMPORT', 50, "Remove unused import"); 180 const FixKind('REMOVE_UNUSED_IMPORT', 50, "Remove unused import");
180 static const REPLACE_BOOLEAN_WITH_BOOL = const FixKind( 181 static const REPLACE_BOOLEAN_WITH_BOOL = const FixKind(
181 'REPLACE_BOOLEAN_WITH_BOOL', 50, "Replace 'boolean' with 'bool'"); 182 'REPLACE_BOOLEAN_WITH_BOOL', 50, "Replace 'boolean' with 'bool'");
182 static const REPLACE_IMPORT_URI = 183 static const REPLACE_IMPORT_URI =
183 const FixKind('REPLACE_IMPORT_URI', 50, "Replace with '{0}'"); 184 const FixKind('REPLACE_IMPORT_URI', 50, "Replace with '{0}'");
(...skipping 10 matching lines...) Expand all
194 static const USE_CONST = const FixKind('USE_CONST', 50, "Change to constant"); 195 static const USE_CONST = const FixKind('USE_CONST', 50, "Change to constant");
195 static const USE_EFFECTIVE_INTEGER_DIVISION = const FixKind( 196 static const USE_EFFECTIVE_INTEGER_DIVISION = const FixKind(
196 'USE_EFFECTIVE_INTEGER_DIVISION', 197 'USE_EFFECTIVE_INTEGER_DIVISION',
197 50, 198 50,
198 "Use effective integer division ~/"); 199 "Use effective integer division ~/");
199 static const USE_EQ_EQ_NULL = 200 static const USE_EQ_EQ_NULL =
200 const FixKind('USE_EQ_EQ_NULL', 50, "Use == null instead of 'is Null'"); 201 const FixKind('USE_EQ_EQ_NULL', 50, "Use == null instead of 'is Null'");
201 static const USE_NOT_EQ_NULL = 202 static const USE_NOT_EQ_NULL =
202 const FixKind('USE_NOT_EQ_NULL', 50, "Use != null instead of 'is! Null'"); 203 const FixKind('USE_NOT_EQ_NULL', 50, "Use != null instead of 'is! Null'");
203 } 204 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/correction/fix_internal.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698