Add go fix to Makefile
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user