mirror of
https://github.com/jeremyd/ergo.git
synced 2026-05-14 07:38:36 -07:00
add gofmt check to make test
This commit is contained in:
10
.check-gofmt.sh
Executable file
10
.check-gofmt.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# exclude vendor/
|
||||
SOURCES="./oragono.go ./irc"
|
||||
|
||||
if [ -n "$(gofmt -s -l $SOURCES)" ]; then
|
||||
echo "Go code is not formatted correctly with \`gofmt -s\`:"
|
||||
gofmt -s -d $SOURCES
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user