mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-25 21:39:25 +01:00
add make gofmt
This commit is contained in:
parent
114e359347
commit
70a6ea375c
@ -3,6 +3,10 @@
|
|||||||
# exclude vendor/
|
# exclude vendor/
|
||||||
SOURCES="./oragono.go ./irc"
|
SOURCES="./oragono.go ./irc"
|
||||||
|
|
||||||
|
if [ "$1" = "--fix" ]; then
|
||||||
|
exec gofmt -s -w $SOURCES
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$(gofmt -s -l $SOURCES)" ]; then
|
if [ -n "$(gofmt -s -l $SOURCES)" ]; then
|
||||||
echo "Go code is not formatted correctly with \`gofmt -s\`:"
|
echo "Go code is not formatted correctly with \`gofmt -s\`:"
|
||||||
gofmt -s -d $SOURCES
|
gofmt -s -d $SOURCES
|
||||||
|
5
Makefile
5
Makefile
@ -1,4 +1,4 @@
|
|||||||
.PHONY: all install build release capdefs test smoke
|
.PHONY: all install build release capdefs test smoke gofmt
|
||||||
|
|
||||||
GIT_COMMIT := $(shell git rev-parse HEAD 2> /dev/null)
|
GIT_COMMIT := $(shell git rev-parse HEAD 2> /dev/null)
|
||||||
|
|
||||||
@ -36,3 +36,6 @@ test:
|
|||||||
smoke:
|
smoke:
|
||||||
oragono mkcerts --conf ./default.yaml || true
|
oragono mkcerts --conf ./default.yaml || true
|
||||||
oragono run --conf ./default.yaml --smoke
|
oragono run --conf ./default.yaml --smoke
|
||||||
|
|
||||||
|
gofmt:
|
||||||
|
./.check-gofmt.sh --fix
|
||||||
|
Loading…
Reference in New Issue
Block a user