carlos / platform Public

staticcheck: turn SA4006 on

Every SA4006 site was read and dealt with in the two commits before
this one, so `make staticcheck` is clean with it on. The conf's comment
now says what the family found and that it is on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 7d882eec56c2bc09d8ac72bd5d2896ba20e1067e parent 8692f18
1 file changed, +8 −6
  • staticcheck.conf +8 −6
diff --git a/staticcheck.conf b/staticcheck.conf
index a66272fd2..f21e89621 100644
--- a/staticcheck.conf
+++ b/staticcheck.conf
@@ -7,7 +7,7 @@
# them: ST1005 118, U1000 68, ST1013 35, S1038 26. Turning one on is its
# own branch, with the tree cleaned first, so the gate stays green.
#
-# Three SA checks are off too, each a family too large to fix safely in
+# Two SA checks are off too, each a family too large to fix safely in
# the branch that added this file. Counts are from that branch's run on
# 15b1ee6b, with -tags rootrunner,carlos_cutover_witness. A follow-up owns each one:
# fix the sites, then delete the line here.
@@ -21,12 +21,14 @@
# (moved into net/http), then go/parser.ParseDir,
# httputil.ReverseProxy's Director and ecdsa's raw key
# coordinates. Each needs a real migration, not a rename.
-# SA4006 70 sites (10 outside tests): a value assigned and never
-# read. Most are test leftovers, but some outside tests hide a
-# real error that is never looked at, so each wants reading,
-# not deleting.
+#
+# SA4006 (a value assigned and never read) was off here too, with 70
+# sites. Branch staticcheck-sa4006 read every one, removed the dead
+# stores, restored seven test checks that had lost their assertion, and
+# turned it on; it found no production bug this time (#1141 was the one
+# it had found before).
#
# Deliberate cases of an enabled check carry a `//lint:ignore <check>
# <reason>` on the line above them (the empty critical sections that are
# barriers, for instance). staticcheck ignores `//nolint` comments.
-checks = ["SA*", "-SA1012", "-SA1019", "-SA4006"]
+checks = ["SA*", "-SA1012", "-SA1019"]