open-vault/.circleci/config/jobs/fmt.yml
Nick Cabatoff f1c92200b2
Reduce number of places where go version is set (#17762)
Reduce go version references to two: .go_version and @executors.yml.
2022-11-01 15:37:13 -04:00

18 lines
518 B
YAML

description: Ensure go formatting is correct.
executor: go-machine
steps:
- checkout
# Setup Go enabling the proxy for downloading modules.
- setup-go:
GOPROXY: https://proxy.golang.org,direct
- run:
name: make fmt
command: |
echo "Using gofumpt version ${GOFUMPT_VERSION}"
go install "mvdan.cc/gofumpt@v${GOFUMPT_VERSION}"
make fmt
if ! git diff --exit-code; then
echo "Code has formatting errors. Run 'make fmt' to fix"
exit 1
fi