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

Unified Diff: pkg/polymer/lib/src/build/linter.dart

Issue 370423002: Hide linter warning for auto-binding-dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: add polymer-element to the list and remove from the if Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/polymer/test/build/linter_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/build/linter.dart
diff --git a/pkg/polymer/lib/src/build/linter.dart b/pkg/polymer/lib/src/build/linter.dart
index 9e683f422e0db64286ce47eafce6d51ec22dfebc..a48badbf2fa554e64cdee41f26ddfda8159b6288 100644
--- a/pkg/polymer/lib/src/build/linter.dart
+++ b/pkg/polymer/lib/src/build/linter.dart
@@ -338,8 +338,11 @@ class _LinterVisitor extends TreeVisitor {
hasIsAttribute = true;
}
- if (customTagName == null || customTagName == 'polymer-element') return;
-
+ if (customTagName == null ||
+ INTERNALLY_DEFINED_ELEMENTS.contains(customTagName)) {
+ return;
+ }
+
var info = _elements[customTagName];
if (info == null) {
// TODO(jmesserly): this warning is wrong if someone is using raw custom
@@ -451,3 +454,6 @@ const String USE_INIT_DART =
const String NO_DART_SCRIPT_AND_EXPERIMENTAL =
'The experimental bootstrap feature doesn\'t support script tags on '
'the main document (for now).';
+
+const List<String> INTERNALLY_DEFINED_ELEMENTS =
+ const ['auto-binding-dart', 'polymer-element'];
« no previous file with comments | « no previous file | pkg/polymer/test/build/linter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698