v2 moved issues.exclude-rules to linters.exclusions.rules and issues.exclude-dirs to linters.exclusions.paths. Enable the std-error-handling preset for defer Close() patterns. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
685 B
YAML
29 lines
685 B
YAML
version: "2"
|
|
|
|
linters:
|
|
enable:
|
|
- errcheck
|
|
- gosec
|
|
- govet
|
|
- ineffassign
|
|
- staticcheck
|
|
- unused
|
|
exclusions:
|
|
presets:
|
|
- std-error-handling
|
|
rules:
|
|
# binary.Write in ICO header encoding — panic-level errors only
|
|
- path: internal/icons/render\.go
|
|
linters: [errcheck]
|
|
source: "binary\\.Write"
|
|
# systray menu.ShowMenu has no meaningful error
|
|
- path: internal/tray/
|
|
linters: [errcheck]
|
|
source: "ShowMenu"
|
|
# Setup binary is a CLI wizard; best-effort error handling is acceptable
|
|
- path: cmd/setup/
|
|
linters: [errcheck, gosec]
|
|
paths:
|
|
- cmd/panel
|
|
- cmd/icongen
|