Gate sc on static analysis and a coverage ratchet #26
No reviewers
Labels
No labels
⏳in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grey.ooo/someones.computer_agent!26
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/static-analysis-and-coverage-gate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Companion to scclient #4, which explains the shape. Same
.golangci.yaml,hack/lint.shandhack/coverage.sh.What it found here, and why the exclusions are narrow
os.Exitdoes not run deferred functions.mainhaddefer stop()for the signal handler and thenos.Exit(1)on the failing path — teardown that reads as if it runs and doesn't.stop()is called explicitly now (gocritic'sexitAfterDefer).Eight unchecked
Closecalls, answered one at a time. Excluding(*os.File).Closewholesale would have silenced all eight in one line — and would also have silenced a write close, which is the case that actually loses data. Every one of these is a read or an already-failing path, so each gets_ =and the linter keeps watching the writes.gzip.Readerandio.PipeReaderare read-only by construction, so those two live in the config.Four gosec findings, all this program reading files the user pointed it at — a
.sc.yml,.git/HEAD, a build context — plus a spinner picking a random face. Each carries a#nosecwith the reason on the line, the same way the platform repo's Dockerfiles carryhadolint ignorepragmas.Floors recorded
ui97.3,config92.2,detect87.1,upload81.2,cli80.7,bundle75.6,selfupdate73.7,cmd/sc0.0.go build,go vet,go test ./...andhack/lint.shall clean.