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

Unified Diff: ppapi/generators/idl_lint.py

Issue 10565023: Adding warning for missing Label. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/generators/idl_lint.py
===================================================================
--- ppapi/generators/idl_lint.py (revision 142626)
+++ ppapi/generators/idl_lint.py (working copy)
@@ -43,6 +43,12 @@
node.Warning('Expecting a comment.')
warnings += 1
+ if node.IsA('File'):
+ labels = node.GetListOf('Label')
+ interfaces = node.GetListOf('Interface')
+ if interfaces and not labels:
+ node.Warning('Expecting a label in a file containing interfaces.')
+
if node.IsA('Struct', 'Typedef') and not node.GetProperty('wpass'):
if node.GetProperty('passByValue'):
pbv = 'is'
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698