From 036434b5a4bfc268bce478fec0bcb0bf82fd1573 Mon Sep 17 00:00:00 2001 From: dwrz Date: Sat, 26 Sep 2026 17:16:06 +0000 Subject: [PATCH] Add go fix to Makefile --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f0761f1..2107d26 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ GOFMT := go fmt GOVET := go vet GOIMPORTS := go tool goimports DEADCODE := go tool deadcode +GOFIX := $(GO) fix GOVULNCHECK := go tool govulncheck STATICCHECK := go tool staticcheck BIOME := biome @@ -14,7 +15,7 @@ BIOME := biome BUILDFLAGS := -buildvcs=true PLATFORMS := linux/amd64 -.PHONY: all build build-all buildinfo check clean deadcode deps fmt help \ +.PHONY: all build build-all buildinfo check clean deadcode deps fix fmt help \ imports install lint run staticcheck test tidy tools uninstall \ verify vet vulncheck $(CMDS) @@ -68,7 +69,11 @@ test: $(GO) test -cover -race ./... ## Run all linters (fmt, vet, imports, deadcode, vulncheck) -lint: fmt vet imports deadcode vulncheck staticcheck biome +lint: fix fmt imports vet deadcode vulncheck staticcheck biome + +## Automatically fix code for newer Go versions +fix: + $(GOFIX) ./... ## Format code using go fmt fmt: