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
c9cd50dc
Commit
c9cd50dc
authored
May 01, 2015
by
Eric Paris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check python files for valid license boilerplate
parent
f416289a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
verify-boilerplate.sh
hack/verify-boilerplate.sh
+3
-0
boilerplate.py.txt
hooks/boilerplate.py.txt
+16
-0
prepare-commit-msg
hooks/prepare-commit-msg
+6
-0
No files found.
hack/verify-boilerplate.sh
View file @
c9cd50dc
...
@@ -46,6 +46,9 @@ files_need_boilerplate+=($(${boiler} "go" "${files[@]}"))
...
@@ -46,6 +46,9 @@ files_need_boilerplate+=($(${boiler} "go" "${files[@]}"))
files
=(
$(
find_files
"sh"
)
)
files
=(
$(
find_files
"sh"
)
)
files_need_boilerplate+
=(
$(${
boiler
}
"sh"
"
${
files
[@]
}
"
)
)
files_need_boilerplate+
=(
$(${
boiler
}
"sh"
"
${
files
[@]
}
"
)
)
files
=(
$(
find_files
"py"
)
)
files_need_boilerplate+
=(
$(${
boiler
}
"py"
"
${
files
[@]
}
"
)
)
if
[[
${#
files_need_boilerplate
[@]
}
-gt
0
]]
;
then
if
[[
${#
files_need_boilerplate
[@]
}
-gt
0
]]
;
then
for
file
in
"
${
files_need_boilerplate
[@]
}
"
;
do
for
file
in
"
${
files_need_boilerplate
[@]
}
"
;
do
echo
"Boilerplate header is wrong for:
${
file
}
"
echo
"Boilerplate header is wrong for:
${
file
}
"
...
...
hooks/boilerplate.py.txt
0 → 100755
View file @
c9cd50dc
#!/usr/bin/env python
# Copyright 2014 The Kubernetes Authors All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
hooks/prepare-commit-msg
View file @
c9cd50dc
...
@@ -27,6 +27,12 @@ if [[ ${#files[@]} -gt 0 ]]; then
...
@@ -27,6 +27,12 @@ if [[ ${#files[@]} -gt 0 ]]; then
files_need_boilerplate+
=(
$(
"
${
boiler
}
"
"sh"
"
${
files
[@]
}
"
)
)
files_need_boilerplate+
=(
$(
"
${
boiler
}
"
"sh"
"
${
files
[@]
}
"
)
)
fi
fi
# Check for py files without the required boilerplate.
files
=(
$(
git diff
--cached
--name-only
--diff-filter
ACM |
grep
"
\.
py"
|
grep
-v
-e
"third_party"
-e
"Godeps"
)
)
if
[[
${#
files
}
-gt
0
]]
;
then
files_need_boilerplate+
=(
$(
"
${
boiler
}
"
"py"
"
${
files
[@]
}
"
)
)
fi
# Check API schema definitions for field descriptions
# Check API schema definitions for field descriptions
for
file
in
$(
git diff
--cached
--name-only
--diff-filter
ACM | egrep
"pkg/api/v.[^/]*/types
\.
go"
|
grep
-v
"third_party"
)
;
do
for
file
in
$(
git diff
--cached
--name-only
--diff-filter
ACM | egrep
"pkg/api/v.[^/]*/types
\.
go"
|
grep
-v
"third_party"
)
;
do
# Check for files with fields without description tags
# Check for files with fields without description tags
...
...
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