summaryrefslogtreecommitdiffstats
path: root/third_party/PRESUBMIT.py
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/PRESUBMIT.py')
-rw-r--r--third_party/PRESUBMIT.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/third_party/PRESUBMIT.py b/third_party/PRESUBMIT.py
index 8f142b7..6812a18 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