fix(ci): update golangci-lint config for v2.6 compatibility
Some checks failed
CI / Test (pull_request) Successful in 26s
CI / Lint (pull_request) Failing after 5s
CI / Build (pull_request) Successful in 16s
CI / Format Check (pull_request) Successful in 2s

- Change version from number to string: version: "2"
- Remove deprecated exclude-use-default option
- Change exclude-rules to exclude (new format in v2.6)
- Remove deprecated output section (print-issued-lines, print-linter-name)
- Remove linters-settings (not allowed in v2.6 schema validation)

Fixes CI validation errors with golangci-lint v2.6.1:
- version type validation error
- exclude-use-default and exclude-rules not allowed
- output options not allowed
- linters-settings not allowed at root level
This commit is contained in:
2025-11-06 10:14:13 +01:00
parent c05038ccf2
commit b56b3c8c93

View File

@@ -1,7 +1,7 @@
# golangci-lint configuration # golangci-lint configuration
# See https://golangci-lint.run/usage/configuration/ # See https://golangci-lint.run/usage/configuration/
version: 2 version: "2"
run: run:
timeout: 5m timeout: 5m
@@ -17,23 +17,13 @@ linters:
disable: disable:
- gocritic # Can be enabled later for stricter checks - gocritic # Can be enabled later for stricter checks
linters-settings:
gosec:
severity: medium
errcheck:
check-blank: true
issues: issues:
exclude-use-default: false
max-issues-per-linter: 0 max-issues-per-linter: 0
max-same-issues: 0 max-same-issues: 0
exclude-rules: exclude:
# Exclude test files from some checks # Exclude test files from some checks
- path: _test\.go - path: _test\.go
linters: linters:
- errcheck - errcheck
- gosec - gosec
output:
print-issued-lines: true
print-linter-name: true