style: extract hash test goconst literals - #1088
Open
devsy-app[bot] wants to merge 1 commit into
Open
Conversation
✅ Deploy Preview for devsydev canceled.
|
✅ Deploy Preview for images-devsy-sh canceled.
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
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
Extracts repeated string literals in
pkg/util/hash/hash_test.goflagged bygolangci-lint'sgoconstlinter into named unexported constants. This is a mechanical, behavior-preserving refactor — the test inputs and assertions are unchanged; only string literals are now referenced via aconst (...)block.Linter + category
golangci-lint(Go) —.golangci.yamlgoconst(repeated string literals)*.log,*.test,node_modules,vendor,scripts,src,package.json,test,scripts/install.sh)Change
const (...)block at the top ofpkg/util/hash/hash_test.gowith 9 unexported string constants.No behavioral changes — formatting and lint fixes only. No linters were disabled.
Verification
task cli:format— clean (gofumpt applied; const block aligned)task cli:lint:ci(new-from-patch againstorigin/main) — 0 new issuesgo build ./.../go vet ./...— passpkg/util/hash— PASS (3.361s, coverage 80.4%)task cli:test— all packages pass except the known pre-existing failures:pkg/git(TestRepoClone*) — documented pre-existing stale-assertion failure onorigin/main; this change does not touchpkg/git.pkg/docker(TestRunCmd_CancelKillsProcessGroup) — environment-dependent process-group timing test; this change does not touchpkg/docker.This PR was created by an AI agent as part of an automated daily lint fix job.