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

Side by Side Diff: PRESUBMIT.py

Issue 15747011: Enforced new rules for braces in conditional and loop bodies in style checker. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated terminology in comments. Created 7 years, 7 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 | Tools/Scripts/webkitpy/style/checkers/cpp.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) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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 Blink. 5 """Top-level presubmit script for Blink.
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 license_header = r'.*' 42 license_header = r'.*'
43 43
44 results = [] 44 results = []
45 results.extend(input_api.canned_checks.PanProjectChecks( 45 results.extend(input_api.canned_checks.PanProjectChecks(
46 input_api, output_api, excluded_paths=_EXCLUDED_PATHS, 46 input_api, output_api, excluded_paths=_EXCLUDED_PATHS,
47 maxlen=800, license_header=license_header)) 47 maxlen=800, license_header=license_header))
48 results.extend(_CheckForVersionControlConflicts(input_api, output_api)) 48 results.extend(_CheckForVersionControlConflicts(input_api, output_api))
49 results.extend(_CheckPatchFiles(input_api, output_api)) 49 results.extend(_CheckPatchFiles(input_api, output_api))
50 results.extend(_CheckTestExpectations(input_api, output_api)) 50 results.extend(_CheckTestExpectations(input_api, output_api))
51 results.extend(_CheckUnwantedDependencies(input_api, output_api)) 51 results.extend(_CheckUnwantedDependencies(input_api, output_api))
52 results.extend(_CheckStyle(input_api, output_api))
abarth-chromium 2013/05/24 06:06:39 This seems like a separate issue from the rest of
52 return results 53 return results
53 54
54 55
55 def _CheckSubversionConfig(input_api, output_api): 56 def _CheckSubversionConfig(input_api, output_api):
56 """Verifies the subversion config file is correctly setup. 57 """Verifies the subversion config file is correctly setup.
57 58
58 Checks that autoprops are enabled, returns an error otherwise. 59 Checks that autoprops are enabled, returns an error otherwise.
59 """ 60 """
60 join = input_api.os_path.join 61 join = input_api.os_path.join
61 if input_api.platform == 'win32': 62 if input_api.platform == 'win32':
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 'You added one or more #includes of files that are temporarily\n ' 195 'You added one or more #includes of files that are temporarily\n '
195 'allowed but being removed. Can you avoid introducing the\n' 196 'allowed but being removed. Can you avoid introducing the\n'
196 '#include? See relevant DEPS file(s) for details and contacts.', 197 '#include? See relevant DEPS file(s) for details and contacts.',
197 warning_descriptions)) 198 warning_descriptions))
198 return results 199 return results
199 200
200 201
201 def CheckChangeOnUpload(input_api, output_api): 202 def CheckChangeOnUpload(input_api, output_api):
202 results = [] 203 results = []
203 results.extend(_CommonChecks(input_api, output_api)) 204 results.extend(_CommonChecks(input_api, output_api))
204 results.extend(_CheckStyle(input_api, output_api))
205 return results 205 return results
206 206
207 207
208 def CheckChangeOnCommit(input_api, output_api): 208 def CheckChangeOnCommit(input_api, output_api):
209 results = [] 209 results = []
210 results.extend(_CommonChecks(input_api, output_api)) 210 results.extend(_CommonChecks(input_api, output_api))
211 results.extend(input_api.canned_checks.CheckTreeIsOpen( 211 results.extend(input_api.canned_checks.CheckTreeIsOpen(
212 input_api, output_api, 212 input_api, output_api,
213 json_url='http://blink-status.appspot.com/current?format=json')) 213 json_url='http://blink-status.appspot.com/current?format=json'))
214 results.extend(input_api.canned_checks.CheckChangeHasDescription( 214 results.extend(input_api.canned_checks.CheckChangeHasDescription(
215 input_api, output_api)) 215 input_api, output_api))
216 results.extend(_CheckSubversionConfig(input_api, output_api)) 216 results.extend(_CheckSubversionConfig(input_api, output_api))
217 return results 217 return results
218 218
219 def GetPreferredTrySlaves(project, change): 219 def GetPreferredTrySlaves(project, change):
220 return ['linux_layout_rel', 'mac_layout_rel', 'win_layout_rel'] 220 return ['linux_layout_rel', 'mac_layout_rel', 'win_layout_rel']
OLDNEW
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/style/checkers/cpp.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698