Skip to content

style: lowercase Rekor error strings and drop redundant json.Number type#46

Merged
ogulcanaydogan merged 1 commit into
mainfrom
style/v0.2.31-staticcheck-st-cleanup
May 27, 2026
Merged

style: lowercase Rekor error strings and drop redundant json.Number type#46
ogulcanaydogan merged 1 commit into
mainfrom
style/v0.2.31-staticcheck-st-cleanup

Conversation

@ogulcanaydogan
Copy link
Copy Markdown
Owner

Summary

  • pkg/signer/sigstore.go (3 sites) + pkg/verifier/rekor.go (1 site) — lowercase "Rekor" → "rekor" in returned error strings (staticcheck ST1005). Composes cleanly when wrapped via fmt.Errorf("verify foo: %w", err).
  • pkg/auth/jwt.go:438var num json.Number = json.Number(t)num := json.Number(t) (staticcheck ST1023). Type is already inferable from the conversion.
  • CHANGELOG.md — two entries under ### Changed.

Context

Closes 2 of the remaining 3 staticcheck-v2 check families deferred by the golangci-lint v2 migration. noctx on cmd/vaol-server/main.go:302 (server bootstrap net.Listen) is deliberately kept open as a separate follow-up since the listener has no cancellation requirement.

Companion to PR #45 (refactor: QF1012 + QF1001).

Test plan

  • go build ./... clean
  • go test ./pkg/signer/... ./pkg/verifier/... ./pkg/auth/... green
  • No tests or callers depend on capitalized "Rekor" prefix (grep -rn 'Rekor status\|Rekor response\|Rekor entry' returns 0 hits after the change)
  • CI Lint (Go) job no longer flags ST1005/ST1023 in these files

- pkg/signer/sigstore.go (3 sites) + pkg/verifier/rekor.go (1 site):
  lowercase 'Rekor' to lowercase 'rekor' in returned error strings so
  they compose cleanly when wrapped with fmt.Errorf (staticcheck
  ST1005). No callers depend on the capitalization.
- pkg/auth/jwt.go: replace 'var num json.Number = json.Number(t)' with
  'num := json.Number(t)' since the type is already inferable from the
  conversion (staticcheck ST1023).
@ogulcanaydogan ogulcanaydogan merged commit 5ce1892 into main May 27, 2026
17 checks passed
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