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

Side by Side Diff: tools/presubmit.py

Issue 2354263003: [inspector] add presubmit.py to compile inspector-related scripts (Closed)
Patch Set: addressed comments 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
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', 298 'cpplint.py',
299 'check_injected_script_source.py',
299 'copy.js', 300 'copy.js',
300 'corrections.js', 301 'corrections.js',
301 'crypto.js', 302 'crypto.js',
302 'daemon.py', 303 'daemon.py',
303 'debugger-script.js', 304 'debugger-script.js',
304 'earley-boyer.js', 305 'earley-boyer.js',
305 'fannkuch.js', 306 'fannkuch.js',
306 'fasta.js', 307 'fasta.js',
308 'generate_protocol_externs.py',
307 'injected-script.cc', 309 'injected-script.cc',
308 'injected-script.h', 310 'injected-script.h',
309 'injected-script-source.js', 311 'injected-script-source.js',
310 'java-script-call-frame.cc', 312 'java-script-call-frame.cc',
311 'java-script-call-frame.h', 313 'java-script-call-frame.h',
312 'jsmin.py', 314 'jsmin.py',
313 'libraries.cc', 315 'libraries.cc',
314 'libraries-empty.cc', 316 'libraries-empty.cc',
315 'lua_binarytrees.js', 317 'lua_binarytrees.js',
316 'memops.js', 318 'memops.js',
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 parser = GetOptions() 498 parser = GetOptions()
497 (options, args) = parser.parse_args() 499 (options, args) = parser.parse_args()
498 success = True 500 success = True
499 print "Running C++ lint check..." 501 print "Running C++ lint check..."
500 if not options.no_lint: 502 if not options.no_lint:
501 success &= CppLintProcessor().Run(workspace) 503 success &= CppLintProcessor().Run(workspace)
502 print "Running copyright header, trailing whitespaces and " \ 504 print "Running copyright header, trailing whitespaces and " \
503 "two empty lines between declarations check..." 505 "two empty lines between declarations check..."
504 success &= SourceProcessor().Run(workspace) 506 success &= SourceProcessor().Run(workspace)
505 success &= CheckExternalReferenceRegistration(workspace) 507 success &= CheckExternalReferenceRegistration(workspace)
506 success &= CheckStatusFiles(workspace) 508 success &= CheckStatusFiles(workspace)
Michael Achenbach 2016/09/28 09:54:05 This script also runs continuously on our bots. If
kozy 2016/09/28 23:38:47 SGTM. I'll add it later after testing of PRESUBMIT
507 if success: 509 if success:
508 return 0 510 return 0
509 else: 511 else:
510 return 1 512 return 1
511 513
512 514
513 if __name__ == '__main__': 515 if __name__ == '__main__':
514 sys.exit(Main()) 516 sys.exit(Main())
OLDNEW
« src/inspector/build/compile-scripts.py ('K') | « src/inspector/injected-script-source.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698