microcks-cli
microcks-cli copied to clipboard
ci: add go test, go vet, and staticcheck gates to build-verify workflow
Summary:
The CI pipeline only compiled binaries — go test, go vet, and static analysis never ran on any PR. Real bugs shipped undetected as a result.
Evidence: what these gates catch
| Bug | PR | Gate that catches it |
|---|---|---|
req.Body read instead of resp.Body |
#338 | go vet |
panic(err.Error()) in connector code |
#341, #319 | staticcheck |
TestDeleteContext fails on clean checkout |
#334 | go test ./... |
| String-concatenation JSON injection | #341 | staticcheck |
fmt.Errorf result discarded in watcher/executor.go |
this PR | go vet ← caught immediately |
Changes:
.github/workflows/build-verify.yml— addgo test ./...,go vet ./..., andstaticchecksteps before the build stepMakefile— addmake testandmake vettargets for local developer usepkg/watcher/executor.go— fixgo vetfinding:fmt.Errorfreturn value was discarded, silently swallowing config load errors (replaced withfmt.Printf+return)
Testing
go test ./... ✅ all pass go vet ./... ✅ clean (after executor.go fix) go build ./... ✅ clean
Fixes #355
happy to adjust anything...