| 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
|
|
|
|
|
|
|