OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2012 the V8 project authors. All rights reserved. | 3 # Copyright 2012 the V8 project authors. All rights reserved. |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 class CppLintProcessor(SourceFileProcessor): | 186 class CppLintProcessor(SourceFileProcessor): |
187 """ | 187 """ |
188 Lint files to check that they follow the google code style. | 188 Lint files to check that they follow the google code style. |
189 """ | 189 """ |
190 | 190 |
191 def IsRelevant(self, name): | 191 def IsRelevant(self, name): |
192 return name.endswith('.cc') or name.endswith('.h') | 192 return name.endswith('.cc') or name.endswith('.h') |
193 | 193 |
194 def IgnoreDir(self, name): | 194 def IgnoreDir(self, name): |
195 # TODO(dgozman): remove inspector after fixing the issues. | |
196 return (super(CppLintProcessor, self).IgnoreDir(name) | 195 return (super(CppLintProcessor, self).IgnoreDir(name) |
197 or (name == 'third_party') or (name == 'inspector')) | 196 or (name == 'third_party')) |
198 | 197 |
199 IGNORE_LINT = ['flag-definitions.h'] | 198 IGNORE_LINT = ['flag-definitions.h'] |
200 | 199 |
201 def IgnoreFile(self, name): | 200 def IgnoreFile(self, name): |
202 return (super(CppLintProcessor, self).IgnoreFile(name) | 201 return (super(CppLintProcessor, self).IgnoreFile(name) |
203 or (name in CppLintProcessor.IGNORE_LINT)) | 202 or (name in CppLintProcessor.IGNORE_LINT)) |
204 | 203 |
205 def GetPathsToSearch(self): | 204 def GetPathsToSearch(self): |
206 return ['src', 'include', 'samples', join('test', 'cctest'), | 205 return ['src', 'include', 'samples', join('test', 'cctest'), |
207 join('test', 'unittests')] | 206 join('test', 'unittests')] |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 success &= CheckExternalReferenceRegistration(workspace) | 504 success &= CheckExternalReferenceRegistration(workspace) |
506 success &= CheckStatusFiles(workspace) | 505 success &= CheckStatusFiles(workspace) |
507 if success: | 506 if success: |
508 return 0 | 507 return 0 |
509 else: | 508 else: |
510 return 1 | 509 return 1 |
511 | 510 |
512 | 511 |
513 if __name__ == '__main__': | 512 if __name__ == '__main__': |
514 sys.exit(Main()) | 513 sys.exit(Main()) |
OLD | NEW |