Run gofmt on all files, complain about the diff. (#106)

This commit is contained in:
Sebastian Zagrodzki
2021-11-03 22:39:59 +01:00
committed by GitHub
parent bdb184b25c
commit 1f6abc1f14

View File

@@ -8,6 +8,7 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: 1.17
- run: DIFF="$( find . -name '*.go' -print0 | xargs -0 gofmt -l )"; if [ -n "$DIFF" ]; then echo "Files not formatted, run gofmt:"; echo "$DIFF"; exit 1; fi
- run: sudo apt-get install libusb-1.0-0-dev
- run: go install golang.org/x/tools/cmd/cover@latest
- run: go install golang.org/x/lint/golint@latest