OLD | NEW |
1 #!/usr/bin/python | |
2 # | |
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 3 # found in the LICENSE file. |
6 | 4 |
7 """ Lint for IDL """ | 5 """ Lint for IDL """ |
8 | 6 |
9 import os | 7 import os |
10 import sys | 8 import sys |
11 | 9 |
12 from idl_log import ErrOut, InfoOut, WarnOut | 10 from idl_log import ErrOut, InfoOut, WarnOut |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 for filenode in ast.GetListOf('File'): | 107 for filenode in ast.GetListOf('File'): |
110 name = filenode.GetProperty('NAME') | 108 name = filenode.GetProperty('NAME') |
111 if filenode.GetProperty('ERRORS') > 0: | 109 if filenode.GetProperty('ERRORS') > 0: |
112 ErrOut.Log('%s : Skipped due to errors.' % name) | 110 ErrOut.Log('%s : Skipped due to errors.' % name) |
113 skipList.append(filenode) | 111 skipList.append(filenode) |
114 continue | 112 continue |
115 warnings = IDLLinter().Visit(filenode, 0) | 113 warnings = IDLLinter().Visit(filenode, 0) |
116 if warnings: | 114 if warnings: |
117 WarnOut.Log('%s warning(s) for %s\n' % (warnings, name)) | 115 WarnOut.Log('%s warning(s) for %s\n' % (warnings, name)) |
118 return skipList | 116 return skipList |
119 | |
OLD | NEW |