Skip to content

Fix cmd/bw staticcheck failures blocking CI#127

Merged
jallum merged 1 commit into
mainfrom
fix/cmd-bw-staticcheck
May 7, 2026
Merged

Fix cmd/bw staticcheck failures blocking CI#127
jallum merged 1 commit into
mainfrom
fix/cmd-bw-staticcheck

Conversation

@iautom8things

Copy link
Copy Markdown
Collaborator

Summary

CI is currently red on main because cmd/bw fails the staticcheck
step. This PR makes it green.

Net: +8 / −184 across 9 files, all in cmd/bw/.

Test plan

  • go build ./...
  • staticcheck ./... (clean)
  • go test ./... (full suite passes)

prime_test.go's two newer subtests still called the pre-config cmdPrime
signature, breaking the build. Update both to match the current
(*issue.Store, []string, Writer, *config.Config) (*config.Config, error)
shape used by the other call sites.

Drop five cmd/bw helpers flagged U1000 with no production callers, plus
the tests that existed solely to exercise them:

  - (*Command).valueFlags  (command.go) — never had a caller; commands
    pass hardcoded flag lists straight to ParseArgs
  - validateDate           (defer.go)   — replaced by resolveDateNow in
    the relative-date defer fix
  - toRFC3339Date          (export.go)  — bd-compat padding removed when
    defer_until/due switched to native YYYY-MM-DD
  - fromRFC3339Date        (export.go)  — same
  - relativeTime           (helpers.go) — string wrapper used only by
    the pre-rewrite recap; the re-land in PR #122 calls relativeTimeSince
    directly with parsed time.Time

Three real defer-behavior tests used validateDate as an incidental
date-format check; replace those with an inline time.Parse against the
YYYY-MM-DD format defer actually emits. Also drop the now-unused
"strings" import in export.go.

Keep relativeTimeSince (and its test) behind a //lint:ignore U1000
referencing PR #122, which wires it back into bw recap.
@jallum jallum merged commit c64c729 into main May 7, 2026
1 check passed
@jallum jallum deleted the fix/cmd-bw-staticcheck branch May 7, 2026 11:12
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.

2 participants