mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-19 20:14:04 +00:00
all: check formatting on CI
This commit is contained in:
committed by
Ron Evans
parent
1322f404a6
commit
02ecab833f
@@ -95,6 +95,7 @@ commands:
|
|||||||
paths:
|
paths:
|
||||||
- ~/.cache/go-build
|
- ~/.cache/go-build
|
||||||
- ~/.cache/tinygo
|
- ~/.cache/tinygo
|
||||||
|
- run: make fmt-check
|
||||||
build-linux:
|
build-linux:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
|||||||
@@ -92,9 +92,11 @@ endif
|
|||||||
clean:
|
clean:
|
||||||
@rm -rf build
|
@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:
|
fmt:
|
||||||
@go fmt . ./compiler ./interp ./loader ./ir ./src/device/arm ./src/examples/* ./src/machine ./src/os ./src/runtime ./src/sync ./src/syscall
|
@gofmt -l -w $(FMT_PATHS)
|
||||||
@go fmt ./testdata/*.go
|
fmt-check:
|
||||||
|
@unformatted=$$(gofmt -l $(FMT_PATHS)); [ -z "$$unformatted" ] && exit 0; echo "Unformatted:"; for fn in $$unformatted; do echo " $$fn"; done; exit 1
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@go test -v .
|
@go test -v .
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
TheVersion = `go0.1.0`
|
package sys
|
||||||
|
|
||||||
|
const TheVersion = `go0.1.0`
|
||||||
|
|||||||
Reference in New Issue
Block a user