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

Side by Side Diff: presubmit_canned_checks.py

Issue 6736018: improve logging slightly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: fix baseline of patchset Created 9 years, 9 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 | « git_cl/git_cl.py ('k') | presubmit_support.py » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2010 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 """Generic presubmit checks that can be reused by other presubmit checks.""" 5 """Generic presubmit checks that can be reused by other presubmit checks."""
6 6
7 7
8 ### Description checks 8 ### Description checks
9 9
10 def CheckChangeHasTestField(input_api, output_api): 10 def CheckChangeHasTestField(input_api, output_api):
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 'Build(s) pending. It is suggested to wait that no more than %d ' 624 'Build(s) pending. It is suggested to wait that no more than %d '
625 'builds are pending.' % max_pendings, 625 'builds are pending.' % max_pendings,
626 long_text='\n'.join(out))] 626 long_text='\n'.join(out))]
627 return [] 627 return []
628 628
629 629
630 def CheckOwners(input_api, output_api, source_file_filter=None): 630 def CheckOwners(input_api, output_api, source_file_filter=None):
631 if not input_api.is_committing: 631 if not input_api.is_committing:
632 return [] 632 return []
633 if input_api.tbr: 633 if input_api.tbr:
634 return [output_api.PresubmitNotifyResult('--tbr was specified, ' 634 return [output_api.PresubmitNotifyResult(
635 'skipping OWNERS check')] 635 '--tbr was specified, skipping OWNERS check')]
636 if not input_api.change.issue: 636 if not input_api.change.issue:
637 return [output_api.PresubmitError('Change not uploaded for review')] 637 return [output_api.PresubmitError(
638 "OWNERS check failed: this change has no Rietveld issue number, so "
639 "we can't check it for approvals.")]
638 640
639 affected_files = set([f.LocalPath() for f in 641 affected_files = set([f.LocalPath() for f in
640 input_api.change.AffectedFiles(source_file_filter)]) 642 input_api.change.AffectedFiles(source_file_filter)])
641 643
642 owners_db = input_api.owners_db 644 owners_db = input_api.owners_db
643 owner_email, approvers = _RietveldOwnerAndApprovers(input_api, 645 owner_email, approvers = _RietveldOwnerAndApprovers(input_api,
644 owners_db.email_regexp) 646 owners_db.email_regexp)
645 approvers_plus_owner = approvers.union(set([owner_email])) 647 approvers_plus_owner = approvers.union(set([owner_email]))
646 648
647 missing_files = owners_db.files_not_covered_by(affected_files, 649 missing_files = owners_db.files_not_covered_by(affected_files,
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 input_api, output_api, source_file_filter=text_files)) 828 input_api, output_api, source_file_filter=text_files))
827 results.extend(input_api.canned_checks.CheckSvnForCommonMimeTypes( 829 results.extend(input_api.canned_checks.CheckSvnForCommonMimeTypes(
828 input_api, output_api)) 830 input_api, output_api))
829 results.extend(input_api.canned_checks.CheckLicense( 831 results.extend(input_api.canned_checks.CheckLicense(
830 input_api, output_api, license_header, source_file_filter=sources)) 832 input_api, output_api, license_header, source_file_filter=sources))
831 results.extend(_CheckConstNSObject( 833 results.extend(_CheckConstNSObject(
832 input_api, output_api, source_file_filter=sources)) 834 input_api, output_api, source_file_filter=sources))
833 results.extend(_CheckSingletonInHeaders( 835 results.extend(_CheckSingletonInHeaders(
834 input_api, output_api, source_file_filter=sources)) 836 input_api, output_api, source_file_filter=sources))
835 return results 837 return results
OLDNEW
« no previous file with comments | « git_cl/git_cl.py ('k') | presubmit_support.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698