The golangci-lint-action doesn't properly support v2.1.6 (uses --out-format flag which v2 doesn't support). Remove version: 2 from config to make it compatible with CI v1.64.8. Local v2.x will still work but may show a deprecation warning about the config format.
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
# golangci-lint configuration
|
|
# See https://golangci-lint.run/usage/configuration/
|
|
# Note: CI uses v1.64.8 which doesn't support version: 2
|
|
# Local v2.x will work with this config but may show a deprecation warning
|
|
|
|
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
|