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 """Presubmit script for changes affecting extensions docs server | 5 """Presubmit script for changes affecting extensions docs server |
| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 78 input_api.ReadFile(cron_yaml_path), key='target') | 78 input_api.ReadFile(cron_yaml_path), key='target') |
| 79 | 79 |
| 80 if app_yaml_version == cron_yaml_version: | 80 if app_yaml_version == cron_yaml_version: |
| 81 return [] | 81 return [] |
| 82 return [output_api.PresubmitError( | 82 return [output_api.PresubmitError( |
| 83 'Versions of app.yaml (%s) and cron.yaml (%s) must match' % ( | 83 'Versions of app.yaml (%s) and cron.yaml (%s) must match' % ( |
| 84 app_yaml_version, cron_yaml_version))] | 84 app_yaml_version, cron_yaml_version))] |
| 85 | 85 |
| 86 def _RunPresubmit(input_api, output_api): | 86 def _RunPresubmit(input_api, output_api): |
| 87 _BuildServer(input_api) | 87 _BuildServer(input_api) |
| 88 # For now, print any lint errors. When these have been eliminated, | |
| 89 # move these into the warning list below. | |
| 90 # See crbug.com/434363 and crbug.com/461130. | |
| 91 lint_errors = input_api.canned_checks.RunPylint(input_api, output_api) | |
| 92 if lint_errors: | |
| 93 print(lint_errors) | |
|
not at google - send to devlin
2015/02/24 01:01:25
if you don't do the ''.join thing then it'll forma
tfarina
2015/02/24 01:05:35
it was not possible to do a join in the list:
Attr
not at google - send to devlin
2015/02/24 01:07:30
If I said lint_errors.join('') before, I meant ''.
| |
| 94 | |
| 88 return ( | 95 return ( |
| 89 _WarnIfAppYamlHasntChanged(input_api, output_api) + | 96 _WarnIfAppYamlHasntChanged(input_api, output_api) + |
| 90 _CheckYamlConsistency(input_api, output_api) + | 97 _CheckYamlConsistency(input_api, output_api) + |
| 91 input_api.canned_checks.RunUnitTestsInDirectory( | 98 input_api.canned_checks.RunUnitTestsInDirectory( |
| 92 input_api, output_api, '.', whitelist=WHITELIST, blacklist=BLACKLIST) | 99 input_api, output_api, '.', whitelist=WHITELIST, blacklist=BLACKLIST) |
| 93 ) | 100 ) |
| 94 | 101 |
| 95 def CheckChangeOnUpload(input_api, output_api): | 102 def CheckChangeOnUpload(input_api, output_api): |
| 96 return _RunPresubmit(input_api, output_api) | 103 return _RunPresubmit(input_api, output_api) |
| 97 | 104 |
| 98 def CheckChangeOnCommit(input_api, output_api): | 105 def CheckChangeOnCommit(input_api, output_api): |
| 99 return _RunPresubmit(input_api, output_api) | 106 return _RunPresubmit(input_api, output_api) |
| OLD | NEW |