Update go version
This commit is contained in:
19
Makefile
19
Makefile
@@ -5,16 +5,18 @@ CMD ?= raven
|
||||
|
||||
GO := go
|
||||
GOFMT := go fmt
|
||||
GOFIX := $(GO) fix
|
||||
GOVET := go vet
|
||||
GOIMPORTS := go tool goimports
|
||||
DEADCODE := go tool deadcode
|
||||
STATICCHECK := go tool staticcheck
|
||||
GOVULNCHECK := go tool govulncheck
|
||||
|
||||
BUILDFLAGS := -buildvcs=true
|
||||
PLATFORMS := linux/amd64
|
||||
|
||||
.PHONY: all build build-all buildinfo check clean deadcode deps fmt help \
|
||||
imports install lint run test tidy tools uninstall verify vet \
|
||||
.PHONY: all build build-all buildinfo check clean deadcode deps fix fmt help \
|
||||
imports install lint run staticcheck test tidy tools uninstall verify \
|
||||
vulncheck $(CMDS)
|
||||
|
||||
## Build all binaries (default target)
|
||||
@@ -66,8 +68,12 @@ buildinfo: build
|
||||
test:
|
||||
$(GO) test -cover -race ./...
|
||||
|
||||
## Run all linters (fmt, vet, imports, deadcode, vulncheck)
|
||||
lint: fmt vet imports deadcode vulncheck
|
||||
## Run all linters (fix, fmt, imports, vet, deadcode, vulncheck, staticcheck)
|
||||
lint: fix fmt imports vet deadcode vulncheck staticcheck
|
||||
|
||||
## Automatically fix code for newer Go versions
|
||||
fix:
|
||||
$(GOFIX) ./...
|
||||
|
||||
## Format code using go fmt
|
||||
fmt:
|
||||
@@ -89,6 +95,10 @@ deadcode:
|
||||
vulncheck:
|
||||
$(GOVULNCHECK) ./...
|
||||
|
||||
## Run staticcheck
|
||||
staticcheck:
|
||||
$(STATICCHECK) ./...
|
||||
|
||||
## Run integration checks (alias for lint)
|
||||
check: lint
|
||||
|
||||
@@ -108,6 +118,7 @@ verify:
|
||||
tools:
|
||||
go get -tool golang.org/x/tools/cmd/deadcode@latest
|
||||
go get -tool golang.org/x/tools/cmd/goimports@latest
|
||||
go get -tool honnef.co/go/tools/cmd/staticcheck@latest
|
||||
go get -tool golang.org/x/vuln/cmd/govulncheck@latest
|
||||
|
||||
## Run the default binary (use ARGS="..." to pass arguments)
|
||||
|
||||
Reference in New Issue
Block a user