| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 return False | 293 return False |
| 294 | 294 |
| 295 def GetPathsToSearch(self): | 295 def GetPathsToSearch(self): |
| 296 return ['.'] | 296 return ['.'] |
| 297 | 297 |
| 298 def IgnoreDir(self, name): | 298 def IgnoreDir(self, name): |
| 299 return (super(SourceProcessor, self).IgnoreDir(name) | 299 return (super(SourceProcessor, self).IgnoreDir(name) |
| 300 or (name == 'third_party') | 300 or (name == 'third_party') |
| 301 or (name == 'gyp') | 301 or (name == 'gyp') |
| 302 or (name == 'out') | 302 or (name == 'out') |
| 303 or (name == 'obj')) | 303 or (name == 'obj') |
| 304 or (name == 'DerivedSources')) |
| 304 | 305 |
| 305 IGNORE_COPYRIGHTS = ['cpplint.py', | 306 IGNORE_COPYRIGHTS = ['cpplint.py', |
| 306 'earley-boyer.js', | 307 'earley-boyer.js', |
| 307 'raytrace.js', | 308 'raytrace.js', |
| 308 'crypto.js', | 309 'crypto.js', |
| 309 'libraries.cc', | 310 'libraries.cc', |
| 310 'libraries-empty.cc', | 311 'libraries-empty.cc', |
| 311 'jsmin.py', | 312 'jsmin.py', |
| 312 'regexp-pcre.js'] | 313 'regexp-pcre.js'] |
| 313 IGNORE_TABS = IGNORE_COPYRIGHTS + ['unicode-test.js', 'html-comments.js'] | 314 IGNORE_TABS = IGNORE_COPYRIGHTS + ['unicode-test.js', 'html-comments.js'] |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 print "Running copyright header and trailing whitespaces check..." | 376 print "Running copyright header and trailing whitespaces check..." |
| 376 success = SourceProcessor().Run(workspace) and success | 377 success = SourceProcessor().Run(workspace) and success |
| 377 if success: | 378 if success: |
| 378 return 0 | 379 return 0 |
| 379 else: | 380 else: |
| 380 return 1 | 381 return 1 |
| 381 | 382 |
| 382 | 383 |
| 383 if __name__ == '__main__': | 384 if __name__ == '__main__': |
| 384 sys.exit(Main()) | 385 sys.exit(Main()) |
| OLD | NEW |