add fmt and check for formatting errors
parent
110813b504
commit
10bf35518d
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue