1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-01 06:56:29 +00:00

Initial Commit

This commit is contained in:
Alena Prokharchyk
2017-10-25 17:02:49 -07:00
commit 60574a70bb
54 changed files with 6626 additions and 0 deletions

20
scripts/validate Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
set -e
cd $(dirname $0)/..
echo Running validation
PACKAGES=". $(find -name '*.go' | xargs -I{} dirname {} | cut -f2 -d/ | sort -u | grep -Ev '(^\.$|.git|.trash-cache|vendor|bin)' | sed -e 's!^!./!' -e 's!$!/...!')"
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
test -z "$failed"
echo Running: go fmt
test -z "$(go fmt ${PACKAGES} | tee /dev/stderr)"