summaryrefslogtreecommitdiffstats
path: root/third_party/PRESUBMIT.py
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-11 23:56:45 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-11 23:56:45 +0000
commit1f8b7bd3ce624744734aa7e5c68b45cfc15adfc7 (patch)
tree4fe1fd0d891918fabf40fbac90b24e5575c0815f /third_party/PRESUBMIT.py
parent688fff6b78e01caa5be815cbc04cccbba612e131 (diff)
downloadchromium_src-1f8b7bd3ce624744734aa7e5c68b45cfc15adfc7.zip
chromium_src-1f8b7bd3ce624744734aa7e5c68b45cfc15adfc7.tar.gz
chromium_src-1f8b7bd3ce624744734aa7e5c68b45cfc15adfc7.tar.bz2
Fix third_party PRESUBMIT script
It looked at the wrong file contents for its checks, and it had a redundant check for name. The "Security Critical" text had a different spelling than in README.chromium.template. BUG=none TEST=none Review URL: http://codereview.chromium.org/6820055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81181 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/PRESUBMIT.py')
-rw-r--r--third_party/PRESUBMIT.py19
1 files changed, 7 insertions, 12 deletions
diff --git a/third_party/PRESUBMIT.py b/third_party/PRESUBMIT.py
index e64bd46..b3b5588 100644
--- a/third_party/PRESUBMIT.py
+++ b/third_party/PRESUBMIT.py
@@ -33,40 +33,35 @@ def _CheckThirdPartyReadmesUpdated(input_api, output_api):
r'^Version: [a-zA-Z0-9_\-\.]+\r?$',
input_api.re.IGNORECASE | input_api.re.MULTILINE)
release_pattern = input_api.re.compile(
- r'Included In Release: (yes)|(no)\r?$',
+ r'Security Critical: (yes)|(no)\r?$',
input_api.re.IGNORECASE | input_api.re.MULTILINE)
- for file in readmes:
+ for f in readmes:
contents = input_api.ReadFile(f)
- if not "Name: " in contents:
- errors.append(output_api.PresubmitError(
- 'Third party README files should contain a \'Name\' field.\n'
- 'Check README.chromium.template for details.',
- [file]))
if (not shortname_pattern.search(contents)
and not name_pattern.search(contents)):
errors.append(output_api.PresubmitError(
'Third party README files should contain either a \'Short Name\' or\n'
'a \'Name\' which is the name under which the package is\n'
'distributed. Check README.chromium.template for details.',
- [file]))
+ [f]))
if not version_pattern.search(contents):
errors.append(output_api.PresubmitError(
'Third party README files should contain a \'Version\' field.\n'
'If the package is not versioned or the version is not known\n'
'list the version as \'unknown\'.\n'
'Check README.chromium.template for details.',
- [file]))
+ [f]))
if not release_pattern.search(contents):
errors.append(output_api.PresubmitError(
- 'Third party README files should contain a \'Included In Release\'\n'
+ 'Third party README files should contain a \'Security Critical\'\n'
'field. This field specifies whether the package is built with\n'
'Chromium. Check README.chromium.template for details.',
- [file]))
+ [f]))
return errors
def CheckChangeOnUpload(input_api, output_api):
results = []
results.extend(_CheckThirdPartyReadmesUpdated(input_api, output_api))
- return results \ No newline at end of file
+ return results