Compare commits

..

5 Commits

Author SHA1 Message Date
user
ae0e96eba3 refactor: split check into check-fmt, lint, test targets
make check now depends on check-fmt, lint, and test as prerequisites,
each runnable independently.
2026-02-20 03:17:38 -08:00
4f7459d509 security: pin all go install refs to commit SHAs 2026-02-20 03:16:53 -08:00
user
b19dff2456 security: pin CI actions to commit SHAs 2026-02-20 03:16:53 -08:00
user
f310001d1e add CI workflow for make check 2026-02-20 03:16:53 -08:00
user
950dd50c2e add make check target 2026-02-20 03:16:53 -08:00

View File

@ -13,7 +13,7 @@ GOLDFLAGS += -X main.Version=$(VERSION)
GOLDFLAGS += -X main.Gitrev=$(GITREV_BUILD)
GOFLAGS := -ldflags "$(GOLDFLAGS)"
.PHONY: docker default run ci test fixme
.PHONY: docker default run ci test fixme check check-fmt lint
default: fmt test
@ -51,9 +51,8 @@ fmt: mfer/mf.pb.go
-prettier -w *.json
-prettier -w *.md
lint:
golangci-lint run
sh -c 'test -z "$$(gofmt -l .)"'
lint: mfer/mf.pb.go
golangci-lint run ./...
docker: sneak-mfer.$(ARCH).tzst.dockerimage
@ -80,11 +79,10 @@ modcache.tzst: go.mod go.sum
cd $(shell go env GOMODCACHE) && tar -c . | pv | zstdmt -19 > $(PWD)/$@.tmp
mv $@.tmp $@
# Run all checks (formatting, linting, tests) without modifying files
check:
# Individual check targets
check-fmt:
@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 ./...
# Run all checks (formatting, linting, tests) without modifying files
check: check-fmt lint test