Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 1840930

Browse files
author
Harry Zhang
committed
Support 2017 in boilerplate.py
1 parent 602b268 commit 1840930

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hack/boilerplate/boilerplate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def file_passes(filename, refs, regexs):
8989
if p.search(d):
9090
return False
9191

92-
# Replace all occurrences of the regex "2016|2015|2014" with "YEAR"
92+
# Replace all occurrences of the regex "2017|2016|2015|2014" with "YEAR"
9393
p = regexs["date"]
9494
for i, d in enumerate(data):
9595
(data[i], found) = p.subn('YEAR', d)
@@ -149,8 +149,8 @@ def get_regexs():
149149
regexs = {}
150150
# Search for "YEAR" which exists in the boilerplate, but shouldn't in the real thing
151151
regexs["year"] = re.compile( 'YEAR' )
152-
# dates can be 2014, 2015 or 2016, company holder names can be anything
153-
regexs["date"] = re.compile( '(2014|2015|2016)' )
152+
# dates can be 2014, 2015, 2016 or 2017 company holder names can be anything
153+
regexs["date"] = re.compile( '(2014|2015|2016|2017)' )
154154
# strip // +build \n\n build constraints
155155
regexs["go_build_constraints"] = re.compile(r"^(// \+build.*\n)+\n", re.MULTILINE)
156156
# strip #!.* from shell scripts

0 commit comments

Comments
 (0)