20 lines
338 B
Bash
Executable File
20 lines
338 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
echo Running validation
|
|
|
|
PACKAGES="$(go list -tags "$BUILDTAGS" ./...)"
|
|
|
|
if ! command -v golangci-lint; then
|
|
echo Skipping validation: no golangci-lint available
|
|
exit
|
|
fi
|
|
|
|
echo Running: golangci-lint
|
|
golangci-lint run
|
|
|
|
echo Running: go fmt
|
|
test -z "$(go fmt ${PACKAGES} | tee /dev/stderr)"
|