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
bc9877be
Commit
bc9877be
authored
May 02, 2016
by
dlorenc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make flags hyphenated instead of using underscores.
parent
e1c57916
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
boilerplate.py
hack/boilerplate/boilerplate.py
+4
-4
No files found.
hack/boilerplate/boilerplate.py
View file @
bc9877be
...
...
@@ -29,10 +29,10 @@ parser.add_argument("filenames", help="list of files to check, all files if unsp
rootdir
=
os
.
path
.
dirname
(
__file__
)
+
"/../../"
rootdir
=
os
.
path
.
abspath
(
rootdir
)
parser
.
add_argument
(
"--root
_
dir"
,
default
=
rootdir
,
help
=
"root directory to examine"
)
parser
.
add_argument
(
"--rootdir"
,
default
=
rootdir
,
help
=
"root directory to examine"
)
default_boilerplate_dir
=
os
.
path
.
join
(
rootdir
,
"hack/boilerplate"
)
parser
.
add_argument
(
"--boilerplate
_
dir"
,
default
=
default_boilerplate_dir
)
parser
.
add_argument
(
"--boilerplate
-
dir"
,
default
=
default_boilerplate_dir
)
args
=
parser
.
parse_args
()
...
...
@@ -114,7 +114,7 @@ def normalize_files(files):
newfiles
.
append
(
pathname
)
for
i
,
pathname
in
enumerate
(
newfiles
):
if
not
os
.
path
.
isabs
(
pathname
):
newfiles
[
i
]
=
os
.
path
.
join
(
args
.
root
_
dir
,
pathname
)
newfiles
[
i
]
=
os
.
path
.
join
(
args
.
rootdir
,
pathname
)
return
newfiles
def
get_files
(
extensions
):
...
...
@@ -122,7 +122,7 @@ def get_files(extensions):
if
len
(
args
.
filenames
)
>
0
:
files
=
args
.
filenames
else
:
for
root
,
dirs
,
walkfiles
in
os
.
walk
(
args
.
root
_
dir
):
for
root
,
dirs
,
walkfiles
in
os
.
walk
(
args
.
rootdir
):
# don't visit certain dirs. This is just a performance improvement
# as we would prune these later in normalize_files(). But doing it
# cuts down the amount of filesystem walking we do and cuts down
...
...
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