Skip to content

style: extract hash test goconst literals - #1088

Open
devsy-app[bot] wants to merge 1 commit into
mainfrom
lint-fixer/hash-test-goconst
Open

style: extract hash test goconst literals#1088
devsy-app[bot] wants to merge 1 commit into
mainfrom
lint-fixer/hash-test-goconst

Conversation

@devsy-app

@devsy-app devsy-app Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Extracts repeated string literals in pkg/util/hash/hash_test.go flagged by golangci-lint's goconst linter 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 a const (...) block.

Linter + category

  • Linter: golangci-lint (Go) — .golangci.yaml
  • Category: goconst (repeated string literals)
  • Findings fixed: 9 distinct string literals repeated across the test file (*.log, *.test, node_modules, vendor, scripts, src, package.json, test, scripts/install.sh)

Change

  • Added a const (...) block at the top of pkg/util/hash/hash_test.go with 9 unexported string constants.
  • Replaced all matching string-literal usages with constant references (comments left untouched).

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 against origin/main) — 0 new issues
  • go build ./... / go vet ./... — pass
  • Focused tests: pkg/util/hash — PASS (3.361s, coverage 80.4%)
  • Full task cli:test — all packages pass except the known pre-existing failures:
    • pkg/git (TestRepoClone*) — documented pre-existing stale-assertion failure on origin/main; this change does not touch pkg/git.
    • pkg/docker (TestRunCmd_CancelKillsProcessGroup) — environment-dependent process-group timing test; this change does not touch pkg/docker.
  • Desktop files were not touched.

This PR was created by an AI agent as part of an automated daily lint fix job.

@netlify

netlify Bot commented Aug 17, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 9a5f8a7
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a82de1869d6af000801c5cf

@netlify

netlify Bot commented Aug 17, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 9a5f8a7
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6a82de189d513300083e475f

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

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.

Run reviewer

TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants