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
9920fea5
Commit
9920fea5
authored
Jun 12, 2017
by
Andrzej Wasylkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the issue with formatting issues not being reported when verification fails.
parent
1168552f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
verify-gofmt.sh
hack/verify-gofmt.sh
+5
-1
No files found.
hack/verify-gofmt.sh
View file @
9920fea5
...
@@ -48,7 +48,11 @@ find_files() {
...
@@ -48,7 +48,11 @@ find_files() {
\)
-name
'*.go'
\)
-name
'*.go'
}
}
diff
=
$(
find_files | xargs
${
gofmt
}
-d
-s
2>&1
)
# gofmt exits with non-zero exit code if it finds a problem unrelated to
# formatting (e.g., a file does not parse correctly). Without "|| true" this
# would have led to no useful error message from gofmt, because the script would
# have failed before getting to the "echo" in the block below.
diff
=
$(
find_files | xargs
${
gofmt
}
-d
-s
2>&1
)
||
true
if
[[
-n
"
${
diff
}
"
]]
;
then
if
[[
-n
"
${
diff
}
"
]]
;
then
echo
"
${
diff
}
"
echo
"
${
diff
}
"
exit
1
exit
1
...
...
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