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
af0177ef
Commit
af0177ef
authored
Jun 16, 2016
by
Mike Danese
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup hack/verify-govet.sh to throttle process creation
Running this check as it is on master spikes my load average to 294.19 and looks up my workstation.
parent
a3f09700
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
31 deletions
+1
-31
verify-govet.sh
hack/verify-govet.sh
+1
-31
No files found.
hack/verify-govet.sh
View file @
af0177ef
...
...
@@ -46,34 +46,4 @@ if [[ ${#targets[@]} -eq 0 ]]; then
targets
=
$(
go list ./... | egrep
-v
"/(third_party|vendor)/"
)
fi
# Do this in parallel; results in 5-10x speedup.
pids
=
""
for
i
in
$targets
do
(
# Run go vet using goflags for each target specified.
#
# Remove any lines go vet or godep outputs with the exit status.
# Remove any lines godep outputs about the vendor experiment.
#
# If go vet fails (produces output), grep will succeed, but if go vet
# succeeds (produces no output) grep will fail. Then we just use
# PIPESTATUS[0] which is go's exit code.
#
# The intended result is that each incantation of this line returns
# either 0 (pass) or 1 (fail).
go vet
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
"
$i
"
2>&1
\
|
grep
-v
-E
"exit status|GO15VENDOREXPERIMENT="
\
||
fail
=
${
PIPESTATUS
[0]
}
exit
$fail
)
&
pids+
=
"
$!
"
done
# Count and return the number of failed files (non-zero is a failed vet run).
failedfiles
=
0
for
p
in
$pids
;
do
wait
$p
||
let
"failedfiles+=1"
done
exit
$failedfiles
go vet
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
${
targets
[@]
}
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