Chromium Code Reviews| Index: lib/src/linter.dart |
| diff --git a/lib/src/linter.dart b/lib/src/linter.dart |
| index b81583a629280662109f0509143eb54722c87527..69b33ba9a8ed1f254de4a875730323587b93e9b2 100644 |
| --- a/lib/src/linter.dart |
| +++ b/lib/src/linter.dart |
| @@ -261,14 +261,14 @@ abstract class LintRule extends Linter implements Comparable<LintRule> { |
| @override |
| AstVisitor getVisitor() => null; |
| - void reportLint(AstNode node) { |
| - if (node != null) { |
| + void reportLint(AstNode node, {bool ignoreSyntheticNodes: true}) { |
| + if (node != null && (!node.isSynthetic || !ignoreSyntheticNodes)) { |
| reporter.reportErrorForNode(new _LintCode(name, description), node, []); |
| } |
| } |
| - void reportLintForToken(Token token) { |
| - if (token != null) { |
| + void reportLintForToken(Token token, {bool ignoreSyntheticTokens: true}) { |
| + if (token != null && (!token.isSynthetic || !ignoreSyntheticTokens)) { |
|
Brian Wilkerson
2016/03/01 21:26:54
Interesting. In the parser, when we're not ignorin
pquitslund
2016/03/01 21:30:01
Hmmmm. That is interesting. Maybe I should just
Brian Wilkerson
2016/03/01 21:38:55
It seems consistent to disable lints on synthetic
|
| reporter.reportErrorForToken(new _LintCode(name, description), token, []); |
| } |
| } |