diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-12-28 11:35:14 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-01-27 16:43:59 +0100 |
| commit | 401e8199c85a461c44f22ddc29ed2052167ae155 (patch) | |
| tree | 9be9382313203543af0c60eb500f732a8360c30c /go | |
| parent | d7bac40f11fc18121ca3d26175fb85f187a6f24c (diff) | |
| download | muhqs-game-401e8199c85a461c44f22ddc29ed2052167ae155.tar.gz muhqs-game-401e8199c85a461c44f22ddc29ed2052167ae155.zip | |
make: use all as default target and run golangci-lint in each package
Diffstat (limited to 'go')
| -rw-r--r-- | go/Makefile | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/go/Makefile b/go/Makefile index 15343636..8442dfa9 100644 --- a/go/Makefile +++ b/go/Makefile @@ -6,15 +6,14 @@ WASM := client/client.wasm webtools/webtools.wasm GOFMT := gofumpt -l -w . +.PHONY: all fmt test check $(OBJS) $(WASM) +all: $(OBJS) $(WASM) + .PHONY: client server dummy-ui client: client/client server: server/server dummy-ui: dummy-ui/dummy-ui -.PHONY: all fmt test check $(OBJS) $(WASM) -all: $(OBJS) $(WASM) - - $(OBJS): @echo Building $(@F) @pushd $(@D) >/dev/null && go build && popd >/dev/null @@ -41,4 +40,13 @@ test: exit "$$STATUS" check: - golangci-lint run --skip-dirs webtools + @STATUS=0; \ + for package in $(PACKAGES); do \ + if pushd "$$package" >/dev/null; then \ + golangci-lint run; \ + status="$$?"; \ + if [ "$$status" -ne 0 ]; then STATUS="$$status"; fi; \ + popd >/dev/null; \ + fi; \ + done; \ + exit "$$STATUS" |
