1
0
mirror of https://github.com/rancher/os.git synced 2025-08-01 23:17:50 +00:00

Enable golint

This commit is contained in:
Josh Curl 2016-11-28 00:09:17 -08:00
parent a7c34b9855
commit feaba53aa8
No known key found for this signature in database
GPG Key ID: 82B504B9BCCFA677

View File

@ -9,12 +9,12 @@ PACKAGES=". $(find -name '*.go' | xargs -I{} dirname {} | cut -f2 -d/ | sort -u
echo Running: go vet
go vet ${PACKAGES}
#echo Running: golint
#for i in ${PACKAGES}; do
# if [ -n "$(golint $i | grep -v 'should have comment.*or be unexported' | tee /dev/stderr)" ]; then
# failed=true
# fi
#done
echo Running: golint
for i in ${PACKAGES}; do
if [ -n "$(golint $i | grep -v 'should have comment.*or be unexported' | tee /dev/stderr)" ]; then
failed=true
fi
done
test -z "$failed"
echo Running: go fmt
test -z "$(go fmt ${PACKAGES} | tee /dev/stderr)"