Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 """Chromium presubmit script for src/base. | 5 """Chromium presubmit script for src/base. |
| 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 on the presubmit API built into depot_tools. | 8 for more details on the presubmit API built into depot_tools. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 'See http://groups.google.com/a/chromium.org/group/chromium-dev/' + | 28 'See http://groups.google.com/a/chromium.org/group/chromium-dev/' + |
| 29 'browse_thread/thread/efb28c10435987fd', | 29 'browse_thread/thread/efb28c10435987fd', |
| 30 files) ] | 30 files) ] |
| 31 return [] | 31 return [] |
| 32 | 32 |
| 33 | 33 |
| 34 def _CommonChecks(input_api, output_api): | 34 def _CommonChecks(input_api, output_api): |
| 35 """Checks common to both upload and commit.""" | 35 """Checks common to both upload and commit.""" |
| 36 results = [] | 36 results = [] |
| 37 results.extend(_CheckNoInterfacesInBase(input_api, output_api)) | 37 results.extend(_CheckNoInterfacesInBase(input_api, output_api)) |
| 38 results.extend( | |
| 39 input_api.canned_checks.CheckPatchFormatted(input_api, output_api)) | |
|
danakj
2016/11/10 23:06:51
You might want this only on upload though? I'm not
| |
| 38 return results | 40 return results |
| 39 | 41 |
| 40 def CheckChangeOnUpload(input_api, output_api): | 42 def CheckChangeOnUpload(input_api, output_api): |
| 41 results = [] | 43 results = [] |
| 42 results.extend(_CommonChecks(input_api, output_api)) | 44 results.extend(_CommonChecks(input_api, output_api)) |
| 43 return results | 45 return results |
| 44 | 46 |
| 45 | 47 |
| 46 def CheckChangeOnCommit(input_api, output_api): | 48 def CheckChangeOnCommit(input_api, output_api): |
| 47 results = [] | 49 results = [] |
| 48 results.extend(_CommonChecks(input_api, output_api)) | 50 results.extend(_CommonChecks(input_api, output_api)) |
| 49 return results | 51 return results |
| OLD | NEW |