The golangci-lint-action has compatibility issues with v2.1.6 (uses --out-format flag which v2 doesn't support). Install golangci-lint manually to avoid action limitations and remove version field from config to be compatible with CI v1.64.8. Local v2.x will work but may show warnings.
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
# golangci-lint configuration
|
|
# See https://golangci-lint.run/usage/configuration/
|
|
# Note: No version field - compatible with both v1.64.8 (CI) and v2.x (local)
|
|
# Local v2.x may show a deprecation warning but will work
|
|
|
|
run:
|
|
timeout: 5m
|
|
tests: true
|
|
modules-download-mode: readonly
|
|
|
|
linters:
|
|
enable:
|
|
- errcheck
|
|
- govet
|
|
- staticcheck
|
|
- revive
|
|
- gosec
|
|
disable:
|
|
- gocritic # Can be enabled later for stricter checks
|
|
|
|
linters-settings:
|
|
revive:
|
|
rules:
|
|
- name: exported
|
|
severity: warning
|
|
arguments:
|
|
- checkPrivateReceivers
|
|
# Disable stuttering check - interface names like ConfigProvider are acceptable
|
|
- name: package-comments
|
|
severity: warning
|
|
gosec:
|
|
severity: medium
|
|
errcheck:
|
|
check-blank: true
|
|
|
|
issues:
|
|
exclude-use-default: false
|
|
max-issues-per-linter: 0
|
|
max-same-issues: 0
|
|
exclude-rules:
|
|
# Exclude test files from some checks
|
|
- path: _test\.go
|
|
linters:
|
|
- errcheck
|
|
- gosec
|
|
# ConfigProvider stuttering is acceptable - it's a common pattern for interfaces
|
|
- path: pkg/config/config\.go
|
|
linters:
|
|
- revive
|
|
|
|
output:
|
|
print-issued-lines: true
|
|
print-linter-name: true
|