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

Side by Side Diff: pkg/analyzer/lib/src/dart/error/lint_codes.dart

Issue 2821943003: Fix an issue with restoring certain lint issues from summary files. (Closed)
Patch Set: use const instead of final Created 3 years, 8 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 | « pkg/analyzer/lib/src/dart/analysis/driver.dart ('k') | pkg/analyzer/lib/src/lint/registry.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 analyzer.src.dart.error.lint_codes; 5 library analyzer.src.dart.error.lint_codes;
6 6
7 import 'package:analyzer/error/error.dart'; 7 import 'package:analyzer/error/error.dart';
8 8
9 /** 9 /**
10 * Defines style and best practice recommendations. 10 * Defines style and best practice recommendations.
11 * 11 *
12 * Unlike [HintCode]s, which are akin to traditional static warnings from a 12 * Unlike [HintCode]s, which are akin to traditional static warnings from a
13 * compiler, lint recommendations focus on matters of style and practices that 13 * compiler, lint recommendations focus on matters of style and practices that
14 * might aggregated to define a project's style guide. 14 * might aggregated to define a project's style guide.
15 */ 15 */
16 class LintCode extends ErrorCode { 16 class LintCode extends ErrorCode {
17 const LintCode(String name, String message, [String correction]) 17 const LintCode(String name, String message, [String correction])
18 : super(name, message, correction); 18 : super(name, message, correction);
19 19
20 @override 20 @override
21 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; 21 ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
22 22
23 @override 23 @override
24 ErrorType get type => ErrorType.LINT; 24 ErrorType get type => ErrorType.LINT;
25
26 /**
27 * Overridden so that [LintCode] and its subclasses share the same uniqueName
28 * pattern (we know how to identify a lint even if we don't know the specific
29 * subclass the lint's code is defined in.
30 */
31 String get uniqueName => "LintCode.$name";
25 } 32 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/driver.dart ('k') | pkg/analyzer/lib/src/lint/registry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698