Check gofmt in travis tests
This commit is contained in:
parent
d2e37f8c7d
commit
37e798cd22
8
.travis.gofmt.sh
Executable file
8
.travis.gofmt.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
result="$(gofmt -s -l .)"
|
||||||
|
if [ -n "$result" ]; then
|
||||||
|
echo "Go code is not formatted, run 'gofmt -s -w .'" >&2
|
||||||
|
echo "$result"
|
||||||
|
exit 1
|
||||||
|
fi
|
@ -8,4 +8,5 @@ install:
|
|||||||
- go get golang.org/x/tools/cmd/cover
|
- go get golang.org/x/tools/cmd/cover
|
||||||
script:
|
script:
|
||||||
- ./.test-coverage travis-ci
|
- ./.test-coverage travis-ci
|
||||||
|
- ./.travis.gofmt.sh
|
||||||
- go install github.com/FreifunkBremen/yanic
|
- go install github.com/FreifunkBremen/yanic
|
||||||
|
Loading…
Reference in New Issue
Block a user