style: lowercase Rekor error strings and drop redundant json.Number type#46
Merged
Merged
Conversation
- 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pkg/signer/sigstore.go(3 sites) +pkg/verifier/rekor.go(1 site) — lowercase "Rekor" → "rekor" in returned error strings (staticcheckST1005). Composes cleanly when wrapped viafmt.Errorf("verify foo: %w", err).pkg/auth/jwt.go:438—var num json.Number = json.Number(t)→num := json.Number(t)(staticcheckST1023). Type is already inferable from the conversion.### Changed.Context
Closes 2 of the remaining 3 staticcheck-v2 check families deferred by the golangci-lint v2 migration.
noctxoncmd/vaol-server/main.go:302(server bootstrapnet.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 ./...cleango test ./pkg/signer/... ./pkg/verifier/... ./pkg/auth/...greengrep -rn 'Rekor status\|Rekor response\|Rekor entry'returns 0 hits after the change)Lint (Go)job no longer flags ST1005/ST1023 in these files