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

Side by Side Diff: PRESUBMIT.py

Issue 2619763004: Exclude deleted OWNERS files from presubmit tag check. (Closed)
Patch Set: Created 3 years, 11 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
« 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 depot_tools. 8 for more details about the presubmit API built into depot_tools.
9 """ 9 """
10 10
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 long_text=error.output)] 751 long_text=error.output)]
752 752
753 753
754 def _CheckTeamTags(input_api, output_api): 754 def _CheckTeamTags(input_api, output_api):
755 """Checks that OWNERS files have consistent TEAM and COMPONENT tags.""" 755 """Checks that OWNERS files have consistent TEAM and COMPONENT tags."""
756 checkteamtags_tool = input_api.os_path.join( 756 checkteamtags_tool = input_api.os_path.join(
757 input_api.PresubmitLocalPath(), 757 input_api.PresubmitLocalPath(),
758 'tools', 'checkteamtags', 'checkteamtags.py') 758 'tools', 'checkteamtags', 'checkteamtags.py')
759 args = [input_api.python_executable, checkteamtags_tool, 759 args = [input_api.python_executable, checkteamtags_tool,
760 '--root', input_api.change.RepositoryRoot()] 760 '--root', input_api.change.RepositoryRoot()]
761 files = [f.LocalPath() for f in input_api.AffectedFiles() 761 files = [f.LocalPath() for f in input_api.AffectedFiles(include_deletes=False)
762 if input_api.os_path.basename(f.AbsoluteLocalPath()).upper() == 762 if input_api.os_path.basename(f.AbsoluteLocalPath()).upper() ==
763 'OWNERS'] 763 'OWNERS']
764 try: 764 try:
765 if files: 765 if files:
766 input_api.subprocess.check_output(args + files) 766 input_api.subprocess.check_output(args + files)
767 return [] 767 return []
768 except input_api.subprocess.CalledProcessError as error: 768 except input_api.subprocess.CalledProcessError as error:
769 return [output_api.PresubmitError( 769 return [output_api.PresubmitError(
770 'checkteamtags.py failed:', 770 'checkteamtags.py failed:',
771 long_text=error.output)] 771 long_text=error.output)]
(...skipping 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after
2343 results.extend(input_api.canned_checks.CheckTreeIsOpen( 2343 results.extend(input_api.canned_checks.CheckTreeIsOpen(
2344 input_api, 2344 input_api,
2345 output_api, 2345 output_api,
2346 json_url='http://chromium-status.appspot.com/current?format=json')) 2346 json_url='http://chromium-status.appspot.com/current?format=json'))
2347 2347
2348 results.extend(input_api.canned_checks.CheckChangeHasBugField( 2348 results.extend(input_api.canned_checks.CheckChangeHasBugField(
2349 input_api, output_api)) 2349 input_api, output_api))
2350 results.extend(input_api.canned_checks.CheckChangeHasDescription( 2350 results.extend(input_api.canned_checks.CheckChangeHasDescription(
2351 input_api, output_api)) 2351 input_api, output_api))
2352 return results 2352 return results
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