diff options
author | noelallen@chromium.org <noelallen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-17 05:37:15 +0000 |
---|---|---|
committer | noelallen@chromium.org <noelallen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-17 05:37:15 +0000 |
commit | 9b10059674ad8b44d93ff9e9cfb43235272cdd52 (patch) | |
tree | 5314ccab94fe8a1e26997978cdbb80a17692b810 /ppapi/generators | |
parent | ce09761c265306185fb43d5ceabde90293fc30ae (diff) | |
download | chromium_src-9b10059674ad8b44d93ff9e9cfb43235272cdd52.zip chromium_src-9b10059674ad8b44d93ff9e9cfb43235272cdd52.tar.gz chromium_src-9b10059674ad8b44d93ff9e9cfb43235272cdd52.tar.bz2 |
Adding warning for missing Label.
If a label is not specified for a source IDL file contianing interfaces
then the version of the interface is assumed to be 1.0 and within the
range of the version being generated. This CL adds a warning that the
interface label is unspecified.
BUG=106504
TBR=sehr@google.com
Review URL: https://chromiumcodereview.appspot.com/10565023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142633 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/generators')
-rw-r--r-- | ppapi/generators/idl_lint.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ppapi/generators/idl_lint.py b/ppapi/generators/idl_lint.py index 34fc62d..d60f7e3 100644 --- a/ppapi/generators/idl_lint.py +++ b/ppapi/generators/idl_lint.py @@ -43,6 +43,12 @@ class IDLLinter(IDLVisitor): 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' |