diff options
author | Ayke van Laethem <[email protected]> | 2019-04-12 14:11:23 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2019-04-13 19:58:58 +0200 |
commit | 02ecab833f68467a1ea1126b9e21e10475a43a8a (patch) | |
tree | a5b807167398eab2fca1c1b575c8fb132d45ba46 /Makefile | |
parent | 1322f404a6531e6bd17bf2d2809f0c800f2d8b27 (diff) | |
download | tinygo-02ecab833f68467a1ea1126b9e21e10475a43a8a.tar.gz tinygo-02ecab833f68467a1ea1126b9e21e10475a43a8a.zip |
all: check formatting on CI
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 . |