mirror of
https://github.com/rancher/cli.git
synced 2026-02-05 09:48:36 +01:00
20 lines
419 B
Bash
Executable File
20 lines
419 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
echo Running validation
|
|
|
|
echo Running: go vet
|
|
go vet ./...
|
|
|
|
echo Running: golint
|
|
# 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
|
|
test -z "$failed"
|
|
|
|
echo Running: go fmt
|
|
test -z "$(go fmt ./... | tee /dev/stderr)"
|