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

Unified Diff: third_party/PRESUBMIT.py

Issue 10821103: Make 'License' field in third-party metadata required (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « crypto/third_party/nss/README.chromium ('k') | third_party/README.chromium.template » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/PRESUBMIT.py
diff --git a/third_party/PRESUBMIT.py b/third_party/PRESUBMIT.py
index 8f142b7e8825f4c2160a29e0bba1f3689e0d8ca3..6812a18ac69588a0374ce191d370e524be89ee95 100644
--- a/third_party/PRESUBMIT.py
+++ b/third_party/PRESUBMIT.py
@@ -24,7 +24,7 @@ def _CheckThirdPartyReadmesUpdated(input_api, output_api):
return errors
name_pattern = input_api.re.compile(
- r'^Name: [a-zA-Z0-9_\-\. ]+\r?$',
+ r'^Name: [a-zA-Z0-9_\-\. \(\)]+\r?$',
input_api.re.IGNORECASE | input_api.re.MULTILINE)
shortname_pattern = input_api.re.compile(
r'^Short Name: [a-zA-Z0-9_\-\.]+\r?$',
@@ -33,7 +33,10 @@ 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'Security Critical: (yes)|(no)\r?$',
+ r'^Security Critical: (yes)|(no)\r?$',
+ input_api.re.IGNORECASE | input_api.re.MULTILINE)
+ license_pattern = input_api.re.compile(
+ r'^License: .+\r?$',
input_api.re.IGNORECASE | input_api.re.MULTILINE)
for f in readmes:
@@ -58,6 +61,12 @@ def _CheckThirdPartyReadmesUpdated(input_api, output_api):
'field. This field specifies whether the package is built with\n'
'Chromium. Check README.chromium.template for details.',
[f]))
+ if not license_pattern.search(contents):
+ errors.append(output_api.PresubmitError(
+ 'Third party README files should contain a \'License\' field.\n'
+ 'This field specifies the license used by the package. Check\n'
+ 'README.chromium.template for details.',
+ [f]))
return errors
« no previous file with comments | « crypto/third_party/nss/README.chromium ('k') | third_party/README.chromium.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698