You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-08-10 22:51:31 +02:00
chores: major upgrade of golangci-lint from v1.64.8 to v2.1.6 (#3062)
.golangci.yml migrated with "golangci-lint migrated" and then tweaked to add comments back.
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
|||||||
- name: Get dependencies
|
- name: Get dependencies
|
||||||
env:
|
env:
|
||||||
# renovate: datasource=github-tags depName=golangci/golangci-lint
|
# renovate: datasource=github-tags depName=golangci/golangci-lint
|
||||||
GOLANGCI_LINT_VERSION: v1.64.8
|
GOLANGCI_LINT_VERSION: v2.1.6
|
||||||
run: |
|
run: |
|
||||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION}
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION}
|
||||||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
||||||
|
2
.github/workflows/publish-release.yml
vendored
2
.github/workflows/publish-release.yml
vendored
@@ -50,7 +50,7 @@ jobs:
|
|||||||
- name: Get dependencies
|
- name: Get dependencies
|
||||||
env:
|
env:
|
||||||
# renovate: datasource=github-tags depName=golangci/golangci-lint
|
# renovate: datasource=github-tags depName=golangci/golangci-lint
|
||||||
GOLANGCI_LINT_VERSION: v1.64.8
|
GOLANGCI_LINT_VERSION: v2.1.6
|
||||||
run: |
|
run: |
|
||||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION}
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION}
|
||||||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
||||||
|
@@ -1,50 +1,65 @@
|
|||||||
run:
|
version: "2"
|
||||||
timeout: 120s
|
|
||||||
linters:
|
linters:
|
||||||
|
default: none
|
||||||
enable:
|
enable:
|
||||||
|
- bodyclose
|
||||||
|
- copyloopvar
|
||||||
|
- dogsled
|
||||||
|
- goconst
|
||||||
|
- gocritic
|
||||||
|
- goprintffuncname
|
||||||
|
- gosec
|
||||||
- govet
|
- govet
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- goconst
|
|
||||||
- gofmt
|
|
||||||
- goimports
|
|
||||||
- gosec
|
|
||||||
- gosimple
|
|
||||||
- staticcheck
|
|
||||||
- typecheck
|
|
||||||
- unused
|
|
||||||
- bodyclose
|
|
||||||
- dogsled
|
|
||||||
- goprintffuncname
|
|
||||||
- misspell
|
- misspell
|
||||||
- prealloc
|
- prealloc
|
||||||
- copyloopvar
|
|
||||||
- stylecheck
|
|
||||||
- unconvert
|
|
||||||
- gocritic
|
|
||||||
- revive
|
- revive
|
||||||
disable-all: true
|
- staticcheck
|
||||||
issues:
|
|
||||||
exclude:
|
|
||||||
# To ease migration to golangci-lint v2.1
|
|
||||||
# https://staticcheck.dev/docs/checks/#QF1008
|
|
||||||
- QF1008
|
|
||||||
exclude-rules:
|
|
||||||
- path: _test\.go
|
|
||||||
linters:
|
|
||||||
- scopelint
|
|
||||||
- bodyclose
|
|
||||||
- unconvert
|
- unconvert
|
||||||
|
- unused
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
presets:
|
||||||
|
- comments
|
||||||
|
- common-false-positives
|
||||||
|
- legacy
|
||||||
|
- std-error-handling
|
||||||
|
rules:
|
||||||
|
- linters:
|
||||||
|
- bodyclose
|
||||||
|
- goconst
|
||||||
- gocritic
|
- gocritic
|
||||||
- gosec
|
- gosec
|
||||||
- goconst
|
|
||||||
- revive
|
- revive
|
||||||
- path: _test\.go
|
- scopelint
|
||||||
linters:
|
- unconvert
|
||||||
- revive
|
path: _test\.go
|
||||||
text: "dot-imports:"
|
- linters:
|
||||||
# If we have tests in shared test folders, these can be less strictly linted
|
|
||||||
- path: tests/.*_tests\.go
|
|
||||||
linters:
|
|
||||||
- revive
|
- revive
|
||||||
|
path: _test\.go
|
||||||
|
text: 'dot-imports:'
|
||||||
|
# # If we have tests in shared test folders, these can be less strictly linted
|
||||||
|
- linters:
|
||||||
- bodyclose
|
- bodyclose
|
||||||
- stylecheck
|
- revive
|
||||||
|
- staticcheck
|
||||||
|
path: tests/.*_tests\.go
|
||||||
|
# See https://github.com/oauth2-proxy/oauth2-proxy/issues/3060
|
||||||
|
# https://staticcheck.dev/docs/checks/#QF1008
|
||||||
|
- linters:
|
||||||
|
- staticcheck
|
||||||
|
text: QF1008
|
||||||
|
paths:
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
formatters:
|
||||||
|
enable:
|
||||||
|
- gofmt
|
||||||
|
- goimports
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
paths:
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
Reference in New Issue
Block a user