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
713a9488
Commit
713a9488
authored
Aug 12, 2014
by
Daniel Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix verification scripts to actually look at all go files.
parent
74a7179e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
verify-boilerplate.sh
hack/verify-boilerplate.sh
+7
-10
verify-gofmt.sh
hack/verify-gofmt.sh
+4
-2
No files found.
hack/verify-boilerplate.sh
View file @
713a9488
...
@@ -14,19 +14,16 @@
...
@@ -14,19 +14,16 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
REPO_ROOT
=
"
$(
realpath
"
$(
dirname
$0
)
/.."
)
"
REPO_ROOT
=
"
$(
cd
"
$(
dirname
"
$0
"
)
/../"
&&
pwd
-P
)
"
result
=
0
result
=
0
dirs
=(
"pkg"
"cmd"
)
gofiles
=
"
$(
find
${
REPO_ROOT
}
-type
f |
grep
"[.]go$"
|
grep
-v
"third_party/
\|
release/
\|
output/
\|
target/"
)
"
for
file
in
${
gofiles
}
;
do
for
dir
in
${
dirs
[@]
}
;
do
if
[[
"
$(${
REPO_ROOT
}
/hooks/boilerplate.sh
"
${
file
}
"
)
"
-eq
"0"
]]
;
then
for
file
in
$(
grep
-r
-l
""
"
${
REPO_ROOT
}
/
${
dir
}
/"
|
grep
"[.]go"
)
;
do
echo
"Boilerplate header is wrong for:
${
file
}
"
if
[[
"
$(${
REPO_ROOT
}
/hooks/boilerplate.sh
"
${
file
}
"
)
"
-eq
"0"
]]
;
then
result
=
1
echo
"Boilerplate header is wrong for:
${
file
}
"
fi
result
=
1
fi
done
done
done
dirs
=(
"cluster"
"hack"
"hooks"
)
dirs
=(
"cluster"
"hack"
"hooks"
)
...
...
hack/verify-gofmt.sh
View file @
713a9488
...
@@ -24,9 +24,11 @@ if [[ ${GO_VERSION[2]} != "go1.2" && ${GO_VERSION[2]} != "go1.3" ]]; then
...
@@ -24,9 +24,11 @@ if [[ ${GO_VERSION[2]} != "go1.2" && ${GO_VERSION[2]} != "go1.3" ]]; then
exit
0
exit
0
fi
fi
REPO_ROOT
=
"
$(
cd
"
$(
dirname
"
$0
"
)
/../"
&&
pwd
-P
)
"
bad
=
$(
gofmt
-s
-l
pkg/ cmd/
)
files
=
"
$(
find
${
REPO_ROOT
}
-type
f |
grep
"[.]go$"
|
grep
-v
"third_party/
\|
release/
\|
output/
\|
target/"
)
"
if
[
"
$?
"
!=
"0"
]
;
then
bad
=
$(
gofmt
-s
-l
${
files
})
if
[[
-n
"
${
bad
}
"
]]
;
then
echo
"
$bad
"
echo
"
$bad
"
exit
1
exit
1
fi
fi
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