Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
bec42087
Unverified
Commit
bec42087
authored
Jan 01, 2018
by
Christoph Blecker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update boilerplate for 2018
parent
da9a4d5d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
boilerplate.py
hack/boilerplate/boilerplate.py
+3
-3
No files found.
hack/boilerplate/boilerplate.py
View file @
bec42087
...
...
@@ -107,7 +107,7 @@ def file_passes(filename, refs, regexs):
print
(
'File
%
s is missing the year'
%
filename
,
file
=
verbose_out
)
return
False
# Replace all occurrences of the regex "201
7|2016|2015|2014
" with "YEAR"
# Replace all occurrences of the regex "201
4|2015|2016|2017|2018
" with "YEAR"
p
=
regexs
[
"date"
]
for
i
,
d
in
enumerate
(
data
):
(
data
[
i
],
found
)
=
p
.
subn
(
'YEAR'
,
d
)
...
...
@@ -175,8 +175,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, 2015, 2016,
or 2017
; company holder names can be anything
regexs
[
"date"
]
=
re
.
compile
(
'(2014|2015|2016|2017)'
)
# dates can be 2014, 2015, 2016,
2017, or 2018
; company holder names can be anything
regexs
[
"date"
]
=
re
.
compile
(
'(2014|2015|2016|2017
|2018
)'
)
# strip // +build \n\n build constraints
regexs
[
"go_build_constraints"
]
=
re
.
compile
(
r"^(// \+build.*\n)+\n"
,
re
.
MULTILINE
)
# strip #!.* from shell scripts
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment