Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: tools/presubmit.py

Issue 2354263003: [inspector] add presubmit.py to compile inspector-related scripts (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 return False 288 return False
289 289
290 def GetPathsToSearch(self): 290 def GetPathsToSearch(self):
291 return ['.'] 291 return ['.']
292 292
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',
299 'copy.js', 298 'copy.js',
300 'corrections.js', 299 'corrections.js',
300 'cpplint.py',
301 'crypto.js', 301 'crypto.js',
302 'daemon.py', 302 'daemon.py',
303 'DebuggerScript.js', 303 'DebuggerScript.js',
304 'earley-boyer.js', 304 'earley-boyer.js',
305 'fannkuch.js', 305 'fannkuch.js',
306 'fasta.js', 306 'fasta.js',
307 'generate_protocol_externs.py',
308 'gnuplot-4.6.3-emscripten.js',
307 'InjectedScript.cpp', 309 'InjectedScript.cpp',
308 'InjectedScript.h', 310 'InjectedScript.h',
309 'InjectedScriptSource.js', 311 'InjectedScriptSource.js',
310 'JavaScriptCallFrame.cpp', 312 'JavaScriptCallFrame.cpp',
311 'JavaScriptCallFrame.h', 313 'JavaScriptCallFrame.h',
312 'jsmin.py', 314 'jsmin.py',
315 'libraries-empty.cc',
313 'libraries.cc', 316 'libraries.cc',
314 'libraries-empty.cc',
315 'lua_binarytrees.js', 317 'lua_binarytrees.js',
316 'memops.js', 318 'memops.js',
317 'poppler.js', 319 'poppler.js',
318 'primes.js', 320 'primes.js',
319 'raytrace.js', 321 'raytrace.js',
320 'regexp-pcre.js', 322 'regexp-pcre.js',
321 'rjsmin.py', 323 'rjsmin.py',
322 'ScriptBreakpoint.h', 324 'ScriptBreakpoint.h',
323 'sqlite.js',
324 'sqlite-change-heap.js', 325 'sqlite-change-heap.js',
325 'sqlite-pointer-masking.js', 326 'sqlite-pointer-masking.js',
326 'sqlite-safe-heap.js', 327 'sqlite-safe-heap.js',
328 'sqlite.js',
327 'V8DebuggerScript.h', 329 'V8DebuggerScript.h',
328 'V8FunctionCall.cpp', 330 'V8FunctionCall.cpp',
329 'V8FunctionCall.h', 331 'V8FunctionCall.h',
330 'V8InspectorImpl.cpp', 332 'V8InspectorImpl.cpp',
331 'V8InspectorImpl.h', 333 'V8InspectorImpl.h',
332 'V8RuntimeAgentImpl.cpp', 334 'V8RuntimeAgentImpl.cpp',
333 'V8RuntimeAgentImpl.h', 335 'V8RuntimeAgentImpl.h',
334 'gnuplot-4.6.3-emscripten.js',
335 'zlib.js'] 336 'zlib.js']
336 IGNORE_TABS = IGNORE_COPYRIGHTS + ['unicode-test.js', 'html-comments.js'] 337 IGNORE_TABS = IGNORE_COPYRIGHTS + ['unicode-test.js', 'html-comments.js']
337 338
338 def EndOfDeclaration(self, line): 339 def EndOfDeclaration(self, line):
339 return line == "}" or line == "};" 340 return line == "}" or line == "};"
340 341
341 def StartOfDeclaration(self, line): 342 def StartOfDeclaration(self, line):
342 return line.find("//") == 0 or \ 343 return line.find("//") == 0 or \
343 line.find("/*") == 0 or \ 344 line.find("/*") == 0 or \
344 line.find(") {") != -1 345 line.find(") {") != -1
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 success &= CheckExternalReferenceRegistration(workspace) 506 success &= CheckExternalReferenceRegistration(workspace)
506 success &= CheckStatusFiles(workspace) 507 success &= CheckStatusFiles(workspace)
507 if success: 508 if success:
508 return 0 509 return 0
509 else: 510 else:
510 return 1 511 return 1
511 512
512 513
513 if __name__ == '__main__': 514 if __name__ == '__main__':
514 sys.exit(Main()) 515 sys.exit(Main())
OLDNEW
« src/inspector/debugger_script_externs.js ('K') | « tools/closure-compiler/closure-compiler.jar ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698