mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Update verify boilerplate to support 2016
This commit is contained in:
parent
5abdc2e944
commit
712ab62c63
@ -79,7 +79,7 @@ def file_passes(filename, refs, regexs):
|
||||
if p.search(d):
|
||||
return False
|
||||
|
||||
# Replace all occurrences of the regex "2015|2014" with "YEAR"
|
||||
# Replace all occurrences of the regex "2016|2015|2014" with "YEAR"
|
||||
p = regexs["date"]
|
||||
for i, d in enumerate(data):
|
||||
(data[i], found) = p.subn('YEAR', d)
|
||||
@ -137,8 +137,8 @@ def get_regexs():
|
||||
regexs = {}
|
||||
# Search for "YEAR" which exists in the boilerplate, but shouldn't in the real thing
|
||||
regexs["year"] = re.compile( 'YEAR' )
|
||||
# dates can be 2014 or 2015, company holder names can be anything
|
||||
regexs["date"] = re.compile( '(2014|2015)' )
|
||||
# dates can be 2014, 2015 or 2016, company holder names can be anything
|
||||
regexs["date"] = re.compile( '(2014|2015|2016)' )
|
||||
# strip // +build \n\n build constraints
|
||||
regexs["go_build_constraints"] = re.compile(r"^(// \+build.*\n)+\n", re.MULTILINE)
|
||||
# strip #!.* from shell scripts
|
||||
|
Loading…
Reference in New Issue
Block a user