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

Side by Side Diff: chrome/common/extensions/docs/server2/PRESUBMIT.py

Issue 942263002: Add Pylint for docs server. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 """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
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 return ( 88
89 _WarnIfAppYamlHasntChanged(input_api, output_api) + 89 results = []
90 _CheckYamlConsistency(input_api, output_api) + 90
91 input_api.canned_checks.RunUnitTestsInDirectory( 91 results += input_api.canned_checks.RunPylint(input_api, output_api)
92 results += _WarnIfAppYamlHasntChanged(input_api, output_api)
93 results += _CheckYamlConsistency(input_api, output_api)
94 results += input_api.canned_checks.RunUnitTestsInDirectory(
92 input_api, output_api, '.', whitelist=WHITELIST, blacklist=BLACKLIST) 95 input_api, output_api, '.', whitelist=WHITELIST, blacklist=BLACKLIST)
93 ) 96
97 return results
not at google - send to devlin 2015/02/23 18:43:30 Could you leave the formatting as before?
tfarina 2015/02/23 20:17:55 Any reason why? I assume you are talking about: r
not at google - send to devlin 2015/02/23 20:34:19 Yes. The reason is because it's an unnecessary cos
tfarina 2015/02/23 20:39:21 Indeed! Done.
94 98
95 def CheckChangeOnUpload(input_api, output_api): 99 def CheckChangeOnUpload(input_api, output_api):
96 return _RunPresubmit(input_api, output_api) 100 return _RunPresubmit(input_api, output_api)
97 101
98 def CheckChangeOnCommit(input_api, output_api): 102 def CheckChangeOnCommit(input_api, output_api):
99 return _RunPresubmit(input_api, output_api) 103 return _RunPresubmit(input_api, output_api)
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