From 09314edf5c5464196f31d27b90029568c4dd86ca Mon Sep 17 00:00:00 2001 From: vmfunc Date: Fri, 24 Apr 2026 09:04:50 -0700 Subject: [PATCH] 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) --- .golangci.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 708546e..75a9fea 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -46,11 +46,15 @@ linters: - fmt.Fprintf - fmt.Fprintln 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: - all - -QF1003 - -QF1012 + - -ST1000 + - -ST1003 revive: rules: # stuttering names (scan.ScanResult) need breaking API changes @@ -90,6 +94,19 @@ linters: - path: internal/scan/(ports|shodan|subdomaintakeover)\.go linters: - 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: max-issues-per-linter: 50