Compare commits
5 Commits
5609365e07
...
ae0e96eba3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae0e96eba3 | ||
| 4f7459d509 | |||
|
|
b19dff2456 | ||
|
|
f310001d1e | ||
|
|
950dd50c2e |
18
Makefile
18
Makefile
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user