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

Side by Side Diff: PRESUBMIT.py

Issue 2120283002: Improve handling of DEPS OWNERS PRESUBMIT check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 start_deps = path.rfind('/DEPS') 1090 start_deps = path.rfind('/DEPS')
1091 if start_deps != -1: 1091 if start_deps != -1:
1092 return path[:start_deps] 1092 return path[:start_deps]
1093 else: 1093 else:
1094 return path 1094 return path
1095 unapproved_dependencies = ["'+%s'," % StripDeps(path) 1095 unapproved_dependencies = ["'+%s'," % StripDeps(path)
1096 for path in missing_files] 1096 for path in missing_files]
1097 1097
1098 if unapproved_dependencies: 1098 if unapproved_dependencies:
1099 output_list = [ 1099 output_list = [
1100 output('Missing LGTM from OWNERS of dependencies added to DEPS:\n %s' % 1100 output('You need LGTM from owners of depends-on paths in DEPS that were '
1101 '\n '.join(sorted(unapproved_dependencies)))] 1101 'modified in this CL:\n %s' %
1102 if not input_api.is_committing: 1102 '\n '.join(sorted(unapproved_dependencies)))]
1103 suggested_owners = owners_db.reviewers_for(missing_files, owner_email) 1103 suggested_owners = owners_db.reviewers_for(missing_files, owner_email)
1104 output_list.append(output( 1104 output_list.append(output(
1105 'Suggested missing target path OWNERS:\n %s' % 1105 'Suggested missing target path OWNERS:\n %s' %
1106 '\n '.join(suggested_owners or []))) 1106 '\n '.join(suggested_owners or [])))
Bill Hesse 2016/07/04 14:13:16 I wouldn't change the indents after % unless it is
tandrii(chromium) 2016/07/04 17:21:39 indents in depot_tools are grossly inconsistent :(
1107 return output_list 1107 return output_list
1108 1108
1109 return [] 1109 return []
1110 1110
1111 1111
1112 def _CheckSpamLogging(input_api, output_api): 1112 def _CheckSpamLogging(input_api, output_api):
1113 file_inclusion_pattern = r'.+%s' % _IMPLEMENTATION_EXTENSIONS 1113 file_inclusion_pattern = r'.+%s' % _IMPLEMENTATION_EXTENSIONS
1114 black_list = (_EXCLUDED_PATHS + 1114 black_list = (_EXCLUDED_PATHS +
1115 _TEST_CODE_EXCLUDED_PATHS + 1115 _TEST_CODE_EXCLUDED_PATHS +
1116 input_api.DEFAULT_BLACK_LIST + 1116 input_api.DEFAULT_BLACK_LIST +
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2223 results.extend(input_api.canned_checks.CheckTreeIsOpen( 2223 results.extend(input_api.canned_checks.CheckTreeIsOpen(
2224 input_api, 2224 input_api,
2225 output_api, 2225 output_api,
2226 json_url='http://chromium-status.appspot.com/current?format=json')) 2226 json_url='http://chromium-status.appspot.com/current?format=json'))
2227 2227
2228 results.extend(input_api.canned_checks.CheckChangeHasBugField( 2228 results.extend(input_api.canned_checks.CheckChangeHasBugField(
2229 input_api, output_api)) 2229 input_api, output_api))
2230 results.extend(input_api.canned_checks.CheckChangeHasDescription( 2230 results.extend(input_api.canned_checks.CheckChangeHasDescription(
2231 input_api, output_api)) 2231 input_api, output_api))
2232 return results 2232 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