OLD | NEW |
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 | 5 |
6 """Top-level presubmit script for Skia. | 6 """Top-level presubmit script for Skia. |
7 | 7 |
8 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | 8 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
9 for more details about the presubmit API built into gcl. | 9 for more details about the presubmit API built into gcl. |
10 """ | 10 """ |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 137 |
138 | 138 |
139 def _CommonChecks(input_api, output_api): | 139 def _CommonChecks(input_api, output_api): |
140 """Presubmit checks common to upload and commit.""" | 140 """Presubmit checks common to upload and commit.""" |
141 results = [] | 141 results = [] |
142 sources = lambda x: (x.LocalPath().endswith('.h') or | 142 sources = lambda x: (x.LocalPath().endswith('.h') or |
143 x.LocalPath().endswith('.gypi') or | 143 x.LocalPath().endswith('.gypi') or |
144 x.LocalPath().endswith('.gyp') or | 144 x.LocalPath().endswith('.gyp') or |
145 x.LocalPath().endswith('.py') or | 145 x.LocalPath().endswith('.py') or |
146 x.LocalPath().endswith('.sh') or | 146 x.LocalPath().endswith('.sh') or |
| 147 x.LocalPath().endswith('.m') or |
| 148 x.LocalPath().endswith('.mm') or |
| 149 x.LocalPath().endswith('.go') or |
| 150 x.LocalPath().endswith('.c') or |
| 151 x.LocalPath().endswith('.cc') or |
147 x.LocalPath().endswith('.cpp')) | 152 x.LocalPath().endswith('.cpp')) |
148 results.extend( | 153 results.extend( |
149 _CheckChangeHasEol( | 154 _CheckChangeHasEol( |
150 input_api, output_api, source_file_filter=sources)) | 155 input_api, output_api, source_file_filter=sources)) |
151 results.extend(_PythonChecks(input_api, output_api)) | 156 results.extend(_PythonChecks(input_api, output_api)) |
152 results.extend(_IfDefChecks(input_api, output_api)) | 157 results.extend(_IfDefChecks(input_api, output_api)) |
153 results.extend(_CopyrightChecks(input_api, output_api, | 158 results.extend(_CopyrightChecks(input_api, output_api, |
154 source_file_filter=sources)) | 159 source_file_filter=sources)) |
155 return results | 160 return results |
156 | 161 |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 state and an error if it is in 'Closed' state. | 405 state and an error if it is in 'Closed' state. |
401 """ | 406 """ |
402 results = [] | 407 results = [] |
403 results.extend(_CommonChecks(input_api, output_api)) | 408 results.extend(_CommonChecks(input_api, output_api)) |
404 results.extend( | 409 results.extend( |
405 _CheckTreeStatus(input_api, output_api, json_url=( | 410 _CheckTreeStatus(input_api, output_api, json_url=( |
406 SKIA_TREE_STATUS_URL + '/banner-status?format=json'))) | 411 SKIA_TREE_STATUS_URL + '/banner-status?format=json'))) |
407 results.extend(_CheckLGTMsForPublicAPI(input_api, output_api)) | 412 results.extend(_CheckLGTMsForPublicAPI(input_api, output_api)) |
408 results.extend(_CheckOwnerIsInAuthorsFile(input_api, output_api)) | 413 results.extend(_CheckOwnerIsInAuthorsFile(input_api, output_api)) |
409 return results | 414 return results |
OLD | NEW |