add fmt and check for formatting errors

main
Martin Guibert 2020-12-23 10:54:06 +01:00
parent 110813b504
commit 10bf35518d
1 changed files with 11 additions and 0 deletions

View File

@ -17,6 +17,17 @@ jobs:
- image: golang:1.15
steps:
- checkout
- run:
name: Enforce Go Formatted Code
command: |
go fmt ./...
if [[ -z $(git status --porcelain) ]]; then
echo "Git directory is clean."
else
echo "Git directory is dirty. Run make fmt locally and commit any formatting fixes or generated code."
git status --porcelain
exit 1
fi
- run: make install-tools
- run: make test
- run: