You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CI's golangci-lint flagged 7 issues. All addressed:
- gofmt drift in 4 files (struct-tag alignment): key.go, manifest.go,
builder_test.go, validate_test.go. Plus a few pre-existing e2e
test files the formatter touched along the way. `make fmt`-clean.
- errcheck: `defer r.Close()` on zip.OpenReader return — wrap in a
func literal that discards the error (we're past success at that
point; nothing to do with a close failure).
- deferInLoop: extracted the per-MANIFEST.MF `f.Open()` + scan into
a helper (`readManifestMainClass`) so the defer is scoped to one
call, not a loop iteration. Behaviour unchanged.
- exitAfterDefer in cmd/build.go: previous code called `os.Exit` after
a `defer cancel()` — the cancel would never run. Removed the inline
os.Exit; structured errors now flow through cobra RunE return value
and `cmd/root.go::Execute` renders + sets exit code (the canonical
path the rest of trond uses).
`make lint` is now clean. `go test ./...` still green.
0 commit comments