Files
goplt/.golangci.yml
0x1d d8aab7f5c4
Some checks failed
CI / Build (pull_request) Successful in 6s
CI / Test (pull_request) Successful in 11s
CI / Lint (pull_request) Failing after 4s
CI / Format Check (pull_request) Successful in 2s
fix: add version field for local v2 compatibility and pin CI to v1.64.8
- Add version: 2 to .golangci.yml for local golangci-lint v2.1.6 compatibility
- Pin CI to use golangci-lint v1.64.8 explicitly (should support v2 config)

This ensures the config works both locally (v2.1.6) and in CI (v1.64.8).
If v1.64.8 doesn't support v2 config, we may need to upgrade CI to v2.
2025-11-05 13:29:32 +01:00

54 lines
1.1 KiB
YAML

# golangci-lint configuration
# See https://golangci-lint.run/usage/configuration/
version: 2
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