From 950dd50c2ee8772a64d2e22c19d51d5401037c96 Mon Sep 17 00:00:00 2001 From: user Date: Fri, 20 Feb 2026 02:53:26 -0800 Subject: [PATCH] add make check target --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index e27258f..34e4102 100644 --- a/Makefile +++ b/Makefile @@ -79,3 +79,12 @@ modcache.tzst: go.mod go.sum go mod download -x cd $(shell go env GOMODCACHE) && tar -c . | pv | zstdmt -19 > $(PWD)/$@.tmp mv $@.tmp $@ + +# Run all checks (formatting, linting, tests) without modifying files +check: + @echo "==> Checking formatting..." + @test -z "$$(gofmt -l .)" || (echo "Files not formatted:" && gofmt -l . && exit 1) + @echo "==> Running linter..." + golangci-lint run ./... + @echo "==> Running tests..." + go test -race -timeout 30s ./...