chore: update golangci config to v2 schema

This commit is contained in:
2025-12-27 08:37:08 +01:00
parent de1e3f2190
commit 726cf6ca68

View File

@@ -26,71 +26,67 @@ linters:
- misspell
- copyloopvar
- nilerr
settings:
revive:
confidence: 0.8
severity: warning
rules:
- name: indent-error-flow
- name: early-return
- name: error-naming
- name: var-naming
- name: if-return
- name: exported
- name: context-as-argument
- name: errorf
- name: unexported-return
- name: unnecessary-stmt
- name: unreachable-code
linters-settings:
revive:
confidence: 0.8
ignore-generated-header: true
severity: warning
gocritic:
disabled-checks:
- hugeParam
- ifElseChain
settings:
captLocal:
paramsOnly: false
gosec:
excludes:
- G204
- G601
errcheck:
check-type-assertions: true
staticcheck:
checks: ["all", "-SA1019"]
goconst:
min-len: 3
min-occurrences: 2
exclusions:
paths:
- vendor
- tmp
- dist
rules:
- name: indent-error-flow
- name: early-return
- name: error-naming
- name: var-naming
- name: if-return
- name: exported
- name: context-as-argument
- name: errorf
- name: unexported-return
- name: unnecessary-stmt
- name: unreachable-code
gocritic:
disabled-checks:
- hugeParam
- ifElseChain
settings:
captLocal:
paramsOnly: false
gosec:
excludes:
- G204
- G601
errcheck:
check-type-assertions: true
ignore: |
fmt:.*
staticcheck:
checks: ["all"]
ignore:
- SA1019
goconst:
min-len: 3
min-occurrences: 2
- path: ".*_test\\.go"
linters:
- gosec
- path: "mock/|mocks/"
linters:
- gosec
- revive
- errcheck
issues:
exclude-dirs:
- vendor
- tmp
- dist
exclude-rules:
- path: ".*_test\\.go"
linters:
- gosec
- path: "mock/|mocks/"
linters:
- gosec
- revive
- errcheck
max-issues-per-linter: 0
max-same-issues: 0
output:
format: colored-line-number
formats:
text:
path: stdout
colors: true