Chromium Code Reviews| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 229 return (super(CppLintProcessor, self).IgnoreDir(name) | 229 return (super(CppLintProcessor, self).IgnoreDir(name) |
| 230 or (name == 'third_party')) | 230 or (name == 'third_party')) |
| 231 | 231 |
| 232 IGNORE_LINT = ['flag-definitions.h'] | 232 IGNORE_LINT = ['flag-definitions.h'] |
| 233 | 233 |
| 234 def IgnoreFile(self, name): | 234 def IgnoreFile(self, name): |
| 235 return (super(CppLintProcessor, self).IgnoreFile(name) | 235 return (super(CppLintProcessor, self).IgnoreFile(name) |
| 236 or (name in CppLintProcessor.IGNORE_LINT)) | 236 or (name in CppLintProcessor.IGNORE_LINT)) |
| 237 | 237 |
| 238 def GetPathsToSearch(self): | 238 def GetPathsToSearch(self): |
| 239 return ['src', 'include', 'samples', join('test', 'cctest')] | 239 return ['src', 'include', 'samples', join('test', 'cctest'), join('test', 'u nittests')] |
|
Sven Panne
2014/08/05 07:20:16
80 columns
Benedikt Meurer
2014/08/05 08:06:02
Done.
| |
| 240 | 240 |
| 241 def GetCpplintScript(self, prio_path): | 241 def GetCpplintScript(self, prio_path): |
| 242 for path in [prio_path] + os.environ["PATH"].split(os.pathsep): | 242 for path in [prio_path] + os.environ["PATH"].split(os.pathsep): |
| 243 path = path.strip('"') | 243 path = path.strip('"') |
| 244 cpplint = os.path.join(path, "cpplint.py") | 244 cpplint = os.path.join(path, "cpplint.py") |
| 245 if os.path.isfile(cpplint): | 245 if os.path.isfile(cpplint): |
| 246 return cpplint | 246 return cpplint |
| 247 | 247 |
| 248 return None | 248 return None |
| 249 | 249 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 444 success = SourceProcessor().Run(workspace) and success | 444 success = SourceProcessor().Run(workspace) and success |
| 445 success = CheckGeneratedRuntimeTests(workspace) and success | 445 success = CheckGeneratedRuntimeTests(workspace) and success |
| 446 if success: | 446 if success: |
| 447 return 0 | 447 return 0 |
| 448 else: | 448 else: |
| 449 return 1 | 449 return 1 |
| 450 | 450 |
| 451 | 451 |
| 452 if __name__ == '__main__': | 452 if __name__ == '__main__': |
| 453 sys.exit(Main()) | 453 sys.exit(Main()) |
| OLD | NEW |