@@ -25,7 +25,8 @@ help: ## Display this help
2525
2626
2727GO ?= go
28−GOLANGCILINT ?= golangci-lint
28+# renovate: datasource=github-tags depName=golangci/golangci-lint
29+GOLANGCILINT_VERSION ?= v2.11.4
2930
3031BINARY := oauth2-proxy
3132VERSION ?= $(shell git describe --always --dirty --tags 2>/dev/null || echo "undefined")
@@ -143,7 +144,7 @@ verify-generate: generate ## Verify command to check if alpha config docs are in
143144##@ Miscellaneous
144145
145146.PHONY: test
146−test: lint ## Run all Go tests
147+test: ## Run all Go tests
147148 GO111MODULE=on $(GO) test $(TESTCOVER) -v -race ./...
148149
149150.PHONY: release
@@ -157,7 +158,11 @@ clean: ## Cleanup release and build files
157158
158159.PHONY: lint
159160lint: validate-go-version ## Lint all files using golangci-lint
160− GO111MODULE=on $(GOLANGCILINT) run
161+ GO111MODULE=on $(GO) run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCILINT_VERSION) run --timeout 10m
162+
163+.PHONY: lint-fix
164+lint-fix: validate-go-version ## Lint all files and apply fixes using golangci-lint
165+ GO111MODULE=on $(GO) run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCILINT_VERSION) run --timeout 10m --fix
161166
162167.PHONY: validate-go-version
163168validate-go-version: ## Validate Go environment requirements