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

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

Issue 3009063002: Add fixes for more 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
« 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 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 "Replace the '.' with a '?.' in the invocation"); 221 "Replace the '.' with a '?.' in the invocation");
222 static const REPLACE_WITH_TEAR_OFF = const FixKind( 222 static const REPLACE_WITH_TEAR_OFF = const FixKind(
223 'REPLACE_WITH_TEAR_OFF', 50, "Replace function literal with tear-off"); 223 'REPLACE_WITH_TEAR_OFF', 50, "Replace function literal with tear-off");
224 static const USE_CONST = const FixKind('USE_CONST', 50, "Change to constant"); 224 static const USE_CONST = const FixKind('USE_CONST', 50, "Change to constant");
225 static const USE_EFFECTIVE_INTEGER_DIVISION = const FixKind( 225 static const USE_EFFECTIVE_INTEGER_DIVISION = const FixKind(
226 'USE_EFFECTIVE_INTEGER_DIVISION', 226 'USE_EFFECTIVE_INTEGER_DIVISION',
227 50, 227 50,
228 "Use effective integer division ~/"); 228 "Use effective integer division ~/");
229 static const USE_EQ_EQ_NULL = 229 static const USE_EQ_EQ_NULL =
230 const FixKind('USE_EQ_EQ_NULL', 50, "Use == null instead of 'is Null'"); 230 const FixKind('USE_EQ_EQ_NULL', 50, "Use == null instead of 'is Null'");
231 static const USE_IS_NOT_EMPTY = const FixKind(
232 'USE_NOT_EMPTY', 50, "Use x.isNotEmpty instead of '!x.isEmpty'");
231 static const USE_NOT_EQ_NULL = 233 static const USE_NOT_EQ_NULL =
232 const FixKind('USE_NOT_EQ_NULL', 50, "Use != null instead of 'is! Null'"); 234 const FixKind('USE_NOT_EQ_NULL', 50, "Use != null instead of 'is! Null'");
233 } 235 }
234 236
235 /** 237 /**
236 * The implementation of [FixContext]. 238 * The implementation of [FixContext].
237 */ 239 */
238 class FixContextImpl implements FixContext { 240 class FixContextImpl implements FixContext {
239 @override 241 @override
240 final ResourceProvider resourceProvider; 242 final ResourceProvider resourceProvider;
241 243
242 @override 244 @override
243 final AnalysisDriver analysisDriver; 245 final AnalysisDriver analysisDriver;
244 246
245 @override 247 @override
246 final AnalysisError error; 248 final AnalysisError error;
247 249
248 FixContextImpl(this.resourceProvider, this.analysisDriver, this.error); 250 FixContextImpl(this.resourceProvider, this.analysisDriver, this.error);
249 251
250 FixContextImpl.from(FixContext other) 252 FixContextImpl.from(FixContext other)
251 : resourceProvider = other.resourceProvider, 253 : resourceProvider = other.resourceProvider,
252 analysisDriver = other.analysisDriver, 254 analysisDriver = other.analysisDriver,
253 error = other.error; 255 error = other.error;
254 } 256 }
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