mirror of
https://github.com/rancher/os.git
synced 2025-08-14 13:03:22 +00:00
15 lines
362 B
Bash
Executable File
15 lines
362 B
Bash
Executable File
#!/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}
|
|
test -z "$failed"
|
|
echo Running: go fmt
|
|
test -z "$(go fmt ${PACKAGES} | tee /dev/stderr)"
|