diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-12-28 11:35:14 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:57:13 +0200 |
| commit | dc837ca8d5c74f14cf14f382e9fcb5388f5a827a (patch) | |
| tree | 4d576ae9579e1a6abcd6fc7054d281857ae08ce9 /go | |
| parent | ba4f24e71e4970c3095971fe6c5df7f829cab3e5 (diff) | |
| download | muhqs-game-dc837ca8d5c74f14cf14f382e9fcb5388f5a827a.tar.gz muhqs-game-dc837ca8d5c74f14cf14f382e9fcb5388f5a827a.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" |
