mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
Improve license linting
* Bump max year to $now + 1. * Emit a more specific error for year range where a single year is expected.
This commit is contained in:
parent
2f937a61fd
commit
cf4c281a38
@ -1,12 +1,13 @@
|
||||
import datetime
|
||||
import re
|
||||
|
||||
from ..check import Check
|
||||
|
||||
_MIN_YEAR = 2009
|
||||
_MAX_YEAR = 2030
|
||||
_MAX_YEAR = datetime.date.today().year + 1
|
||||
|
||||
_LICENSE_PATTERN = re.compile(
|
||||
r'// Copyright( \([C]\))? (\w+) .+\. {1,2}All rights reserved\.[\r\n]{1,2}' +
|
||||
r'// Copyright( \(C\))? ([1-9][0-9-]*) .+\. {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…
x
Reference in New Issue
Block a user