Skip to content

fix: clear rowserrcheck and sqlclosecheck; add scoped tier 4 silences#9

Merged
alanwiss merged 3 commits into
mainfrom
fix/sql-rows-close-checks
May 2, 2026
Merged

fix: clear rowserrcheck and sqlclosecheck; add scoped tier 4 silences#9
alanwiss merged 3 commits into
mainfrom
fix/sql-rows-close-checks

Conversation

@alanwiss
Copy link
Copy Markdown
Contributor

@alanwiss alanwiss commented May 2, 2026

Summary

Cleans the inherited test code: removes 27 real-bug lint findings
(rowserrcheck, sqlclosecheck) and silences 200+ documented
false positives in .golangci.yml so future PRs see only signal.

Numbers

  • Repo lint debt: 413 → 170 issues (−243)
  • Touched files: 0 issues under strict --whole-files mode

What changed

  • for rows.Next() loops now check rows.Err(); rows/stmts deferred
  • db.Exec("drop table foo")DROP TABLE IF EXISTS with checked error
  • errors.Is/As instead of ==/type assertions
  • io/ioutil migrated to os / io (deprecated since Go 1.19)
  • .golangci.yml: scoped silences for documented false positives
    (e.g. errcheck on database/sql Close, gosec G104 in tests,
    SHA1/MD5 in sqlite3_func_crypt.go per SQLite UserAuth contract)
  • CONTRIBUTING.md: new Code conventions section

Validation

  • All tests pass under -race
  • Out-of-tree harness:
    • 4-hour soak (98M ops, 16 workers): 0 errors, RSS slope ≈ 0
    • 50× SIGKILL crash injection: 0 corruptions, exact recovery
    • AddressSanitizer (cgo memory): 0 violations
    • 10k property-based crypto roundtrips: 100% pass, 0 wrong-key accepts

Caveats

  • 3 //nolint remain — each with rationale (godoc Example, test discard
    on failure path, controlled-bounds uint→int64 in custom SQL fn)
  • sqlite3_opt_vtable_test.go not touched (behind +build sqlite_vtable)

Signed-off-by: Alan Wiss <alan@moldchat.com>
Signed-off-by: Alan Wiss <alan@moldchat.com>
@alanwiss alanwiss changed the title fix: T1.1+T1.2 cleanup with scoped Tier 4 prelude fix: clear rowserrcheck and sqlclosecheck; add scoped tier 4 silences May 2, 2026
@alanwiss alanwiss merged commit 0dcc762 into main May 2, 2026
12 of 13 checks passed
@alanwiss alanwiss deleted the fix/sql-rows-close-checks branch May 2, 2026 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant