mirror of
https://github.com/tc39/test262.git
synced 2025-07-21 04:54:44 +02:00
Update header regexp to prevent year ranges
This commit is contained in:
parent
f7e6656c13
commit
8b28871eca
@ -29,7 +29,7 @@ class CheckLicense(Check):
|
|||||||
match = _LICENSE_PATTERN.search(source)
|
match = _LICENSE_PATTERN.search(source)
|
||||||
|
|
||||||
if not match:
|
if not match:
|
||||||
return
|
return 'Invalid Copyright header'
|
||||||
|
|
||||||
year_str = match.group(2)
|
year_str = match.group(2)
|
||||||
try:
|
try:
|
||||||
|
@ -17,7 +17,7 @@ _YAML_PATTERN = re.compile(r"/\*---(.*)---\*/" + _BLANK_LINES, re.DOTALL)
|
|||||||
|
|
||||||
# Matches all known variants for the license block.
|
# Matches all known variants for the license block.
|
||||||
_LICENSE_PATTERN = re.compile(
|
_LICENSE_PATTERN = re.compile(
|
||||||
r'// Copyright( \(C\))? (\w+) .+\. {1,2}All rights reserved\.[\r\n]{1,2}' +
|
r'// Copyright( \([C]\))? (\w+) .+\. {1,2}All rights reserved\.[\r\n]{1,2}' +
|
||||||
r'(' +
|
r'(' +
|
||||||
r'// This code is governed by the( BSD)? license found in the LICENSE file\.' +
|
r'// This code is governed by the( BSD)? license found in the LICENSE file\.' +
|
||||||
r'|' +
|
r'|' +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user