Skip to content
Snippets Groups Projects
Commit a651b4da authored by Julian Kornberger's avatar Julian Kornberger Committed by takt
Browse files

Check gofmt during CI build

parent 95811fc8
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
result="$(gofmt -e -s -l . 2>&1 | grep -v '^vendor/' )"
if [ -n "$result" ]; then
echo "Go code is not formatted, run 'gofmt -e -s -w .'" >&2
echo "$result"
exit 1
else
echo "Go code is formatted well"
fi
......@@ -18,3 +18,4 @@ jobs:
- run: go test -v -cover -coverprofile=coverage.out ./...
- run: goveralls -coverprofile=coverage.out -service=circle-ci -repotoken=$COVERALLS_TOKEN
- run: .circleci/build-examples
- run: .circleci/check-gofmt
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment