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 def IgnoreDir(self, name): | 293 def IgnoreDir(self, name): |
294 return (super(SourceProcessor, self).IgnoreDir(name) or | 294 return (super(SourceProcessor, self).IgnoreDir(name) or |
295 name in ('third_party', 'gyp', 'out', 'obj', 'DerivedSources')) | 295 name in ('third_party', 'gyp', 'out', 'obj', 'DerivedSources')) |
296 | 296 |
297 IGNORE_COPYRIGHTS = ['box2d.js', | 297 IGNORE_COPYRIGHTS = ['box2d.js', |
298 'cpplint.py', | 298 'cpplint.py', |
299 'copy.js', | 299 'copy.js', |
300 'corrections.js', | 300 'corrections.js', |
301 'crypto.js', | 301 'crypto.js', |
302 'daemon.py', | 302 'daemon.py', |
303 'DebuggerScript.js', | 303 'debugger-script.js', |
304 'earley-boyer.js', | 304 'earley-boyer.js', |
305 'fannkuch.js', | 305 'fannkuch.js', |
306 'fasta.js', | 306 'fasta.js', |
307 'InjectedScript.cpp', | 307 'injected-script.cc', |
308 'InjectedScript.h', | 308 'injected-script.h', |
309 'InjectedScriptSource.js', | 309 'injected-script-source.js', |
310 'JavaScriptCallFrame.cpp', | 310 'java-script-call-frame.cc', |
311 'JavaScriptCallFrame.h', | 311 'java-script-call-frame.h', |
312 'jsmin.py', | 312 'jsmin.py', |
313 'libraries.cc', | 313 'libraries.cc', |
314 'libraries-empty.cc', | 314 'libraries-empty.cc', |
315 'lua_binarytrees.js', | 315 'lua_binarytrees.js', |
316 'memops.js', | 316 'memops.js', |
317 'poppler.js', | 317 'poppler.js', |
318 'primes.js', | 318 'primes.js', |
319 'raytrace.js', | 319 'raytrace.js', |
320 'regexp-pcre.js', | 320 'regexp-pcre.js', |
321 'rjsmin.py', | 321 'rjsmin.py', |
322 'ScriptBreakpoint.h', | 322 'script-breakpoint.h', |
323 'sqlite.js', | 323 'sqlite.js', |
324 'sqlite-change-heap.js', | 324 'sqlite-change-heap.js', |
325 'sqlite-pointer-masking.js', | 325 'sqlite-pointer-masking.js', |
326 'sqlite-safe-heap.js', | 326 'sqlite-safe-heap.js', |
327 'V8DebuggerScript.h', | 327 'v8-debugger-script.h', |
328 'V8FunctionCall.cpp', | 328 'v8-function-call.cc', |
329 'V8FunctionCall.h', | 329 'v8-function-call.h', |
330 'V8InspectorImpl.cpp', | 330 'v8-inspector-impl.cc', |
331 'V8InspectorImpl.h', | 331 'v8-inspector-impl.h', |
332 'V8RuntimeAgentImpl.cpp', | 332 'v8-runtime-agent-impl.cc', |
333 'V8RuntimeAgentImpl.h', | 333 'v8-runtime-agent-impl.h', |
334 'gnuplot-4.6.3-emscripten.js', | 334 'gnuplot-4.6.3-emscripten.js', |
335 'zlib.js'] | 335 'zlib.js'] |
336 IGNORE_TABS = IGNORE_COPYRIGHTS + ['unicode-test.js', 'html-comments.js'] | 336 IGNORE_TABS = IGNORE_COPYRIGHTS + ['unicode-test.js', 'html-comments.js'] |
337 | 337 |
338 def EndOfDeclaration(self, line): | 338 def EndOfDeclaration(self, line): |
339 return line == "}" or line == "};" | 339 return line == "}" or line == "};" |
340 | 340 |
341 def StartOfDeclaration(self, line): | 341 def StartOfDeclaration(self, line): |
342 return line.find("//") == 0 or \ | 342 return line.find("//") == 0 or \ |
343 line.find("/*") == 0 or \ | 343 line.find("/*") == 0 or \ |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 success &= CheckExternalReferenceRegistration(workspace) | 505 success &= CheckExternalReferenceRegistration(workspace) |
506 success &= CheckStatusFiles(workspace) | 506 success &= CheckStatusFiles(workspace) |
507 if success: | 507 if success: |
508 return 0 | 508 return 0 |
509 else: | 509 else: |
510 return 1 | 510 return 1 |
511 | 511 |
512 | 512 |
513 if __name__ == '__main__': | 513 if __name__ == '__main__': |
514 sys.exit(Main()) | 514 sys.exit(Main()) |
OLD | NEW |