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

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

Issue 1462463004: Remove unused declarations - skip summaries and completion. (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
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 services.src.linter; 5 library services.src.linter;
6 6
7 import 'package:analyzer/analyzer.dart';
7 import 'package:analyzer/plugin/options.dart'; 8 import 'package:analyzer/plugin/options.dart';
8 import 'package:analyzer/analyzer.dart'; 9 import 'package:linter/src/rules.dart';
9 import 'package:yaml/yaml.dart'; 10 import 'package:yaml/yaml.dart';
10 import 'package:linter/src/rules.dart';
11 import 'package:linter/src/linter.dart';
12 11
13 /** 12 /**
14 * An error code indicating an undefined lint rule. 13 * An error code indicating an undefined lint rule.
15 * 14 *
16 * Parameters: 15 * Parameters:
17 * 0: the rule name 16 * 0: the rule name
18 */ 17 */
19 const AnalysisOptionsWarningCode UNDEFINED_LINT_WARNING = 18 const AnalysisOptionsWarningCode UNDEFINED_LINT_WARNING =
20 const AnalysisOptionsWarningCode( 19 const AnalysisOptionsWarningCode(
21 'UNDEFINED_LINT_WARNING', "'{0}' is not a recognized lint rule"); 20 'UNDEFINED_LINT_WARNING', "'{0}' is not a recognized lint rule");
(...skipping 20 matching lines...) Expand all
42 Iterable<String> registeredLints = ruleRegistry.map((r) => r.name); 41 Iterable<String> registeredLints = ruleRegistry.map((r) => r.name);
43 rules.nodes.forEach((YamlNode ruleNode) { 42 rules.nodes.forEach((YamlNode ruleNode) {
44 if (!registeredLints.contains(ruleNode.value)) { 43 if (!registeredLints.contains(ruleNode.value)) {
45 reporter.reportErrorForSpan( 44 reporter.reportErrorForSpan(
46 UNDEFINED_LINT_WARNING, ruleNode.span, [ruleNode.value]); 45 UNDEFINED_LINT_WARNING, ruleNode.span, [ruleNode.value]);
47 } 46 }
48 }); 47 });
49 } 48 }
50 } 49 }
51 } 50 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698