| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 or (name == 'DerivedSources')) | 320 or (name == 'DerivedSources')) |
| 321 | 321 |
| 322 IGNORE_COPYRIGHTS = ['cpplint.py', | 322 IGNORE_COPYRIGHTS = ['cpplint.py', |
| 323 'daemon.py', | 323 'daemon.py', |
| 324 'earley-boyer.js', | 324 'earley-boyer.js', |
| 325 'raytrace.js', | 325 'raytrace.js', |
| 326 'crypto.js', | 326 'crypto.js', |
| 327 'libraries.cc', | 327 'libraries.cc', |
| 328 'libraries-empty.cc', | 328 'libraries-empty.cc', |
| 329 'jsmin.py', | 329 'jsmin.py', |
| 330 'regexp-pcre.js'] | 330 'regexp-pcre.js', |
| 331 'gnuplot-4.6.3-emscripten.js'] |
| 331 IGNORE_TABS = IGNORE_COPYRIGHTS + ['unicode-test.js', 'html-comments.js'] | 332 IGNORE_TABS = IGNORE_COPYRIGHTS + ['unicode-test.js', 'html-comments.js'] |
| 332 | 333 |
| 333 def ProcessContents(self, name, contents): | 334 def ProcessContents(self, name, contents): |
| 334 result = True | 335 result = True |
| 335 base = basename(name) | 336 base = basename(name) |
| 336 if not base in SourceProcessor.IGNORE_TABS: | 337 if not base in SourceProcessor.IGNORE_TABS: |
| 337 if '\t' in contents: | 338 if '\t' in contents: |
| 338 print "%s contains tabs" % name | 339 print "%s contains tabs" % name |
| 339 result = False | 340 result = False |
| 340 if not base in SourceProcessor.IGNORE_COPYRIGHTS: | 341 if not base in SourceProcessor.IGNORE_COPYRIGHTS: |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 print "Running copyright header and trailing whitespaces check..." | 394 print "Running copyright header and trailing whitespaces check..." |
| 394 success = SourceProcessor().Run(workspace) and success | 395 success = SourceProcessor().Run(workspace) and success |
| 395 if success: | 396 if success: |
| 396 return 0 | 397 return 0 |
| 397 else: | 398 else: |
| 398 return 1 | 399 return 1 |
| 399 | 400 |
| 400 | 401 |
| 401 if __name__ == '__main__': | 402 if __name__ == '__main__': |
| 402 sys.exit(Main()) | 403 sys.exit(Main()) |
| OLD | NEW |