mirror of https://github.com/tc39/test262.git
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)
|
||||
|
||||
if not match:
|
||||
return
|
||||
return 'Invalid Copyright header'
|
||||
|
||||
year_str = match.group(2)
|
||||
try:
|
||||
|
|
|
@ -17,7 +17,7 @@ _YAML_PATTERN = re.compile(r"/\*---(.*)---\*/" + _BLANK_LINES, re.DOTALL)
|
|||
|
||||
# Matches all known variants for the license block.
|
||||
_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'// This code is governed by the( BSD)? license found in the LICENSE file\.' +
|
||||
r'|' +
|
||||
|
|
Loading…
Reference in New Issue