58 lines
1.7 KiB
YAML
58 lines
1.7 KiB
YAML
version: "2"
|
|
|
|
run:
|
|
timeout: 5m
|
|
|
|
linters:
|
|
default: standard
|
|
enable:
|
|
- bodyclose
|
|
- errorlint
|
|
- misspell
|
|
settings:
|
|
staticcheck:
|
|
# Bug (SA) and simplification (S) checks only. ST style checks
|
|
# conflict with deliberate complete, capitalized user-facing
|
|
# messages, and QF quickfixes are optional rewrites; neither should
|
|
# gate contributions. S1005 conflicts with errcheck: receiving an
|
|
# error result purely for synchronization is discarded explicitly
|
|
# with _ = <-ch rather than silently.
|
|
checks:
|
|
- all
|
|
- -ST*
|
|
- -QF*
|
|
- -S1005
|
|
errcheck:
|
|
exclude-functions:
|
|
# CLI usage/status output: there is nothing useful to do if writing
|
|
# the message itself fails.
|
|
- fmt.Fprint
|
|
- fmt.Fprintf
|
|
- fmt.Fprintln
|
|
exclusions:
|
|
rules:
|
|
# Close on cleanup paths (pipe ends after spawning helpers,
|
|
# connections and files being discarded) is best-effort teardown
|
|
# with no actionable recovery. Closes whose errors protect data
|
|
# (flushing writers, saved configuration, the debug database)
|
|
# are handled explicitly at those call sites and must stay handled.
|
|
- text: 'Error return value of `[^`]+\.Close` is not checked'
|
|
linters:
|
|
- errcheck
|
|
# Tests routinely ignore fixture teardown errors, and assert exact
|
|
# sentinel identity on errors they constructed unwrapped.
|
|
# Production code must still handle errors or discard them
|
|
# explicitly with _ =.
|
|
- path: _test\.go
|
|
linters:
|
|
- errcheck
|
|
- errorlint
|
|
|
|
issues:
|
|
max-issues-per-linter: 0
|
|
max-same-issues: 0
|
|
|
|
formatters:
|
|
enable:
|
|
- gofmt
|