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

Side by Side Diff: PRESUBMIT.py

Issue 10855266: Don't block CQ usage when includes that violate temporarily-allowed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Top-level presubmit script for Chromium. 5 """Top-level presubmit script for Chromium.
6 6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details about the presubmit API built into gcl. 8 for more details about the presubmit API built into gcl.
9 """ 9 """
10 10
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 error_descriptions.append(description_with_path) 421 error_descriptions.append(description_with_path)
422 else: 422 else:
423 warning_descriptions.append(description_with_path) 423 warning_descriptions.append(description_with_path)
424 424
425 results = [] 425 results = []
426 if error_descriptions: 426 if error_descriptions:
427 results.append(output_api.PresubmitError( 427 results.append(output_api.PresubmitError(
428 'You added one or more #includes that violate checkdeps rules.', 428 'You added one or more #includes that violate checkdeps rules.',
429 error_descriptions)) 429 error_descriptions))
430 if warning_descriptions: 430 if warning_descriptions:
431 results.append(output_api.PresubmitPromptWarning( 431 if not input_api.is_committing:
432 warning_factory = output_api.PresubmitPromptWarning
433 else:
434 # We don't want to block use of the CQ when there is a warning
435 # of this kind, so we only show a message when committing.
436 warning_factory = output_api.PresubmitNotifyResult
437 results.append(warning_factory(
432 'You added one or more #includes of files that are temporarily\n' 438 'You added one or more #includes of files that are temporarily\n'
433 'allowed but being removed. Can you avoid introducing the\n' 439 'allowed but being removed. Can you avoid introducing the\n'
434 '#include? See relevant DEPS file(s) for details and contacts.', 440 '#include? See relevant DEPS file(s) for details and contacts.',
435 warning_descriptions)) 441 warning_descriptions))
436 return results 442 return results
437 443
438 444
439 def _CheckFilePermissions(input_api, output_api): 445 def _CheckFilePermissions(input_api, output_api):
440 """Check that all files have their permissions properly set.""" 446 """Check that all files have their permissions properly set."""
441 args = [sys.executable, 'tools/checkperms/checkperms.py', '--root', 447 args = [sys.executable, 'tools/checkperms/checkperms.py', '--root',
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 599
594 # Match things like path/aura/file.cc and path/file_aura.cc. 600 # Match things like path/aura/file.cc and path/file_aura.cc.
595 # Same for ash and chromeos. 601 # Same for ash and chromeos.
596 if any(re.search('[/_](ash|aura)', f) for f in files): 602 if any(re.search('[/_](ash|aura)', f) for f in files):
597 trybots += ['linux_chromeos', 'linux_chromeos_clang:compile', 'win_aura'] 603 trybots += ['linux_chromeos', 'linux_chromeos_clang:compile', 'win_aura']
598 else: 604 else:
599 if any(re.search('[/_]chromeos', f) for f in files): 605 if any(re.search('[/_]chromeos', f) for f in files):
600 trybots += ['linux_chromeos', 'linux_chromeos_clang:compile'] 606 trybots += ['linux_chromeos', 'linux_chromeos_clang:compile']
601 607
602 return trybots 608 return trybots
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698