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

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

Issue 3007783002: Add fixes for two additional lints (Closed)
Patch Set: Created 3 years, 3 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 unified diff | Download patch
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 import 'package:analysis_server/plugin/edit/fix/fix_core.dart'; 5 import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
6 import 'package:analysis_server/src/services/correction/fix_internal.dart'; 6 import 'package:analysis_server/src/services/correction/fix_internal.dart';
7 import 'package:analyzer/error/error.dart'; 7 import 'package:analyzer/error/error.dart';
8 import 'package:analyzer/file_system/file_system.dart'; 8 import 'package:analyzer/file_system/file_system.dart';
9 import 'package:analyzer/src/dart/analysis/driver.dart'; 9 import 'package:analyzer/src/dart/analysis/driver.dart';
10 import 'package:analyzer/src/error/codes.dart'; 10 import 'package:analyzer/src/error/codes.dart';
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 static const IMPORT_LIBRARY_SDK = 151 static const IMPORT_LIBRARY_SDK =
152 const FixKind('IMPORT_LIBRARY_SDK', 46, "Import library '{0}'"); 152 const FixKind('IMPORT_LIBRARY_SDK', 46, "Import library '{0}'");
153 static const IMPORT_LIBRARY_SHOW = 153 static const IMPORT_LIBRARY_SHOW =
154 const FixKind('IMPORT_LIBRARY_SHOW', 45, "Update library '{0}' import"); 154 const FixKind('IMPORT_LIBRARY_SHOW', 45, "Update library '{0}' import");
155 static const INSERT_SEMICOLON = 155 static const INSERT_SEMICOLON =
156 const FixKind('INSERT_SEMICOLON', 50, "Insert ';'"); 156 const FixKind('INSERT_SEMICOLON', 50, "Insert ';'");
157 static const INVOKE_CONSTRUCTOR_USING_NEW = const FixKind( 157 static const INVOKE_CONSTRUCTOR_USING_NEW = const FixKind(
158 'INVOKE_CONSTRUCTOR_USING_NEW', 50, "Invoke constructor using 'new'"); 158 'INVOKE_CONSTRUCTOR_USING_NEW', 50, "Invoke constructor using 'new'");
159 static const LINT_ADD_OVERRIDE = 159 static const LINT_ADD_OVERRIDE =
160 const FixKind('LINT_ADD_OVERRIDE', 50, "Add '@override' annotation"); 160 const FixKind('LINT_ADD_OVERRIDE', 50, "Add '@override' annotation");
161 static const LINT_ADD_REQUIRED =
162 const FixKind('LINT_ADD_REQUIRED', 50, "Add '@required' annotation");
161 static const LINT_REMOVE_INTERPOLATION_BRACES = const FixKind( 163 static const LINT_REMOVE_INTERPOLATION_BRACES = const FixKind(
162 'LINT_REMOVE_INTERPOLATION_BRACES', 164 'LINT_REMOVE_INTERPOLATION_BRACES',
163 50, 165 50,
164 'Remove unnecessary interpolation braces'); 166 'Remove unnecessary interpolation braces');
165 static const MAKE_CLASS_ABSTRACT = 167 static const MAKE_CLASS_ABSTRACT =
166 const FixKind('MAKE_CLASS_ABSTRACT', 50, "Make class '{0}' abstract"); 168 const FixKind('MAKE_CLASS_ABSTRACT', 50, "Make class '{0}' abstract");
167 static const REMOVE_DEAD_CODE = 169 static const REMOVE_DEAD_CODE =
168 const FixKind('REMOVE_DEAD_CODE', 50, "Remove dead code"); 170 const FixKind('REMOVE_DEAD_CODE', 50, "Remove dead code");
169 static const MAKE_FIELD_NOT_FINAL = 171 static const MAKE_FIELD_NOT_FINAL =
170 const FixKind('MAKE_FIELD_NOT_FINAL', 50, "Make field '{0}' not final"); 172 const FixKind('MAKE_FIELD_NOT_FINAL', 50, "Make field '{0}' not final");
171 static const REMOVE_AWAIT = const FixKind('REMOVE_AWAIT', 50, "Remove await"); 173 static const REMOVE_AWAIT = const FixKind('REMOVE_AWAIT', 50, "Remove await");
174 static const REMOVE_EMPTY_ELSE =
175 const FixKind('REMOVE_EMPTY_ELSE', 50, "Remove empty else clause");
172 static const REMOVE_EMPTY_STATEMENT = 176 static const REMOVE_EMPTY_STATEMENT =
173 const FixKind('REMOVE_EMPTY_STATEMENT', 50, "Remove empty statement"); 177 const FixKind('REMOVE_EMPTY_STATEMENT', 50, "Remove empty statement");
174 static const REMOVE_INITIALIZER = 178 static const REMOVE_INITIALIZER =
175 const FixKind('REMOVE_INITIALIZER', 50, "Remove initializer"); 179 const FixKind('REMOVE_INITIALIZER', 50, "Remove initializer");
176 static const REMOVE_METHOD_DECLARATION = const FixKind( 180 static const REMOVE_METHOD_DECLARATION = const FixKind(
177 'REMOVE_METHOD_DECLARATION', 50, 'Remove method declaration'); 181 'REMOVE_METHOD_DECLARATION', 50, 'Remove method declaration');
178 static const REMOVE_PARAMETERS_IN_GETTER_DECLARATION = const FixKind( 182 static const REMOVE_PARAMETERS_IN_GETTER_DECLARATION = const FixKind(
179 'REMOVE_PARAMETERS_IN_GETTER_DECLARATION', 183 'REMOVE_PARAMETERS_IN_GETTER_DECLARATION',
180 50, 184 50,
181 "Remove parameters in getter declaration"); 185 "Remove parameters in getter declaration");
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 @override 245 @override
242 final AnalysisError error; 246 final AnalysisError error;
243 247
244 FixContextImpl(this.resourceProvider, this.analysisDriver, this.error); 248 FixContextImpl(this.resourceProvider, this.analysisDriver, this.error);
245 249
246 FixContextImpl.from(FixContext other) 250 FixContextImpl.from(FixContext other)
247 : resourceProvider = other.resourceProvider, 251 : resourceProvider = other.resourceProvider,
248 analysisDriver = other.analysisDriver, 252 analysisDriver = other.analysisDriver,
249 error = other.error; 253 error = other.error;
250 } 254 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698