aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2019-04-12 14:11:23 +0200
committerRon Evans <[email protected]>2019-04-13 19:58:58 +0200
commit02ecab833f68467a1ea1126b9e21e10475a43a8a (patch)
treea5b807167398eab2fca1c1b575c8fb132d45ba46 /Makefile
parent1322f404a6531e6bd17bf2d2809f0c800f2d8b27 (diff)
downloadtinygo-02ecab833f68467a1ea1126b9e21e10475a43a8a.tar.gz
tinygo-02ecab833f68467a1ea1126b9e21e10475a43a8a.zip
all: check formatting on CI
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 763f67c33..950bf1638 100644
--- a/Makefile
+++ b/Makefile
@@ -92,9 +92,11 @@ endif
clean:
@rm -rf build
+FMT_PATHS = ./*.go compiler interp ir loader src/device/arm src/examples src/machine src/os src/reflect src/runtime src/sync src/syscall
fmt:
- @go fmt . ./compiler ./interp ./loader ./ir ./src/device/arm ./src/examples/* ./src/machine ./src/os ./src/runtime ./src/sync ./src/syscall
- @go fmt ./testdata/*.go
+ @gofmt -l -w $(FMT_PATHS)
+fmt-check:
+ @unformatted=$$(gofmt -l $(FMT_PATHS)); [ -z "$$unformatted" ] && exit 0; echo "Unformatted:"; for fn in $$unformatted; do echo " $$fn"; done; exit 1
test:
@go test -v .