git.iko.soy/typeable/oauth2-proxy
on master help sign in
ci: use go tool for running golangci-lint

Signed-off-by: Jan Larwig <jan@larwig.com>

commit304077498deeae33e244683d2f714a31e8dbbbd0 authorJan Larwig <jan@larwig.com> dateTue 18 Aug 2026, 08:57 (1 month ago) parent09aa14a
4 files changed+17−15
.github/renovate.json5+9 .github/workflows/ci.yml−6 .github/workflows/publish-release.yml−6 Makefile+8−3
.github/renovate.json5+9
@@ -46,6 +46,15 @@
4646 depNameTemplate: "alpine",
4747 datasourceTemplate: "docker",
4848 },
49+ {
50+ customType: "regex",
51+ fileMatch: [
52+ "^Makefile",
53+ ],
54+ matchStrings: [
55+ "# renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)\\s+?GOLANGCILINT_VERSION \\?= (?<currentValue>.*)\\s",
56+ ],
57+ },
4958 {
5059 customType: "regex",
5160 fileMatch: ["(^|/)\\.github/workflows/[^/]+\\.ya?ml$"],
.github/workflows/ci.yml−6
@@ -35,12 +35,6 @@ jobs:
3535 go-version: ${{ steps.go-version.outputs.version }}
3636 check-latest: true
3737
38− - name: Install golangci-lint
39− uses: golangci/golangci-lint-action@v9
40− with:
41− install-only: true
42− version: v2.11.4 # renovate: datasource=github-tags depName=golangci/golangci-lint
43−
4438 - name: Verify Code Generation
4539 run: |
4640 make verify-generate
.github/workflows/publish-release.yml−6
@@ -55,12 +55,6 @@ jobs:
5555 go-version: ${{ steps.go-version.outputs.version }}
5656 check-latest: true
5757
58− - name: Install golangci-lint
59− uses: golangci/golangci-lint-action@v9
60− with:
61− install-only: true
62− version: v2.11.4 # renovate: datasource=github-tags depName=golangci/golangci-lint
63−
6458 - name: Get go dependencies
6559 run: |
6660 go mod download
Makefile+8−3
@@ -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