1
0
mirror of https://github.com/rancher/cli.git synced 2026-02-05 09:48:36 +01:00
Files
cli/scripts/validate

20 lines
419 B
Plaintext
Raw Normal View History

2016-05-26 20:00:15 -07:00
#!/bin/bash
set -e
cd $(dirname $0)/..
echo Running validation
echo Running: go vet
2018-01-31 15:21:11 -07:00
go vet ./...
2016-05-26 20:00:15 -07:00
echo Running: golint
2018-01-31 15:21:11 -07:00
# use go list until golint acts the same as go-1.9 and ignores vendor with ./...
if [ -n "$(golint $(go list ./...) | grep -v 'should have comment.*or be unexported' | tee /dev/stderr)" ]; then
failed=true
fi
2016-05-26 20:00:15 -07:00
test -z "$failed"
2018-01-31 15:21:11 -07:00
2016-05-26 20:00:15 -07:00
echo Running: go fmt
2018-01-31 15:21:11 -07:00
test -z "$(go fmt ./... | tee /dev/stderr)"