359cff7292
Add .golangci.yml enabling errcheck, staticcheck, govet, gosec, ineffassign, and unused linters. Fix 66 issues across 16 files: - Check all unchecked errors (errcheck) - Use HTTP status constants instead of numeric literals (staticcheck) - Replace deprecated LineUp/LineDown with ScrollUp/ScrollDown (staticcheck) - Convert sprintf+write patterns to fmt.Fprintf (staticcheck) - Add ReadHeaderTimeout to http.Server (gosec) - Remove unused types and functions (unused) - Add nolint comments for intentional patterns (InsecureSkipVerify, math/rand for jitter, dialect-only SQL formatting)
30 lines
421 B
YAML
30 lines
421 B
YAML
version: "2"
|
|
|
|
linters:
|
|
default: none
|
|
enable:
|
|
- errcheck
|
|
- staticcheck
|
|
- govet
|
|
- gosec
|
|
- ineffassign
|
|
- unused
|
|
|
|
settings:
|
|
errcheck:
|
|
check-type-assertions: false
|
|
check-blank: false
|
|
|
|
exclusions:
|
|
presets:
|
|
- std-error-handling
|
|
- common-false-positives
|
|
rules:
|
|
- path: _test\.go
|
|
linters:
|
|
- errcheck
|
|
- gosec
|
|
|
|
run:
|
|
timeout: 5m
|