mirror of
https://github.com/lunchcat/sif.git
synced 2026-04-28 03:23:07 -07:00
ci: suppress v2-only staticcheck rules and 3 stray errcheck cases
second pass after v2 surfaced more old-code noise:
* staticcheck ST1000/ST1003 were the v1 'stylecheck' linter
(never enabled here); disabled to preserve prior parity
* errcheck can't match (io.Closer).Close against concrete
types (tarball, tcp, logger); added narrow file+text rules
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -46,11 +46,15 @@ linters:
|
|||||||
- fmt.Fprintf
|
- fmt.Fprintf
|
||||||
- fmt.Fprintln
|
- fmt.Fprintln
|
||||||
staticcheck:
|
staticcheck:
|
||||||
# disable QF (quickfix) category -- stylistic, not bugs
|
# QF1003/QF1012 are v2 quickfix suggestions, not bugs.
|
||||||
|
# ST1000/ST1003 were the stylecheck linter in v1
|
||||||
|
# (not previously enabled); skipping to match prior parity.
|
||||||
checks:
|
checks:
|
||||||
- all
|
- all
|
||||||
- -QF1003
|
- -QF1003
|
||||||
- -QF1012
|
- -QF1012
|
||||||
|
- -ST1000
|
||||||
|
- -ST1003
|
||||||
revive:
|
revive:
|
||||||
rules:
|
rules:
|
||||||
# stuttering names (scan.ScanResult) need breaking API changes
|
# stuttering names (scan.ScanResult) need breaking API changes
|
||||||
@@ -90,6 +94,19 @@ linters:
|
|||||||
- path: internal/scan/(ports|shodan|subdomaintakeover)\.go
|
- path: internal/scan/(ports|shodan|subdomaintakeover)\.go
|
||||||
linters:
|
linters:
|
||||||
- noctx
|
- noctx
|
||||||
|
# Close on concrete types errcheck can't match to (io.Closer).Close
|
||||||
|
- path: internal/nuclei/templates/templates\.go
|
||||||
|
text: "tarball.Close"
|
||||||
|
linters:
|
||||||
|
- errcheck
|
||||||
|
- path: internal/scan/ports\.go
|
||||||
|
text: "tcp.Close"
|
||||||
|
linters:
|
||||||
|
- errcheck
|
||||||
|
- path: sif\.go
|
||||||
|
text: "logger.Close"
|
||||||
|
linters:
|
||||||
|
- errcheck
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
max-issues-per-linter: 50
|
max-issues-per-linter: 50
|
||||||
|
|||||||
Reference in New Issue
Block a user