Skip to content

style: extract debian codename constants - #1009

Merged
skevetter merged 1 commit into
mainfrom
lint-fixer/dockerinstall-codename-consts
Aug 14, 2026
Merged

skevetter merged 1 commit into
mainfrom
lint-fixer/dockerinstall-codename-consts

Conversation

@devsy-app

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

Copy link
Copy Markdown
Contributor

Summary

Replaces repeated Debian release codename string literals in pkg/dockerinstall with named constants, resolving goconst findings from golangci-lint. No behavioral change.

Linter + category

  • Linter: golangci-lint (Go, .golangci.yaml)
  • Category: goconst — repeated string constants that should be extracted to named constants

Findings fixed

goconst flagged repeated Debian release codename string literals ("trixie", "bookworm", "bullseye", "buster", "stretch", "jessie") used across pkg/dockerinstall in the version map and the corresponding test assertions.

Count: 6 codename literals centralized into named constants (CodenameTrixie, CodenameBookworm, CodenameBullseye, CodenameBuster, CodenameStretch, CodenameJessie) and applied across the package.

Files changed (4)

  • pkg/dockerinstall/constants.go — added codename constants
  • pkg/dockerinstall/detector.go — versionMap now references constants instead of string literals
  • pkg/dockerinstall/detector_test.go — test assertions use constants instead of string literals
  • pkg/dockerinstall/validator_test.go — updated literal reference to use CodenameStretch

Fix method

Mechanical extraction of repeated string literals into named package-level constants, then updating call/test sites to reference them. No logic or behavior changed.

Verification

  • task cli:format — passed (exit 0)
  • task cli:lint:ci — passed, 0 new issues
  • task cli:test — pkg/dockerinstall tests pass
  • pkg/git TestRepoClone* failures are pre-existing on clean origin/main (stale assertion, unrelated to this change â�� not touched by this PR)

Constraints

No behavioral changes � formatting/lint fixes only. No linters disabled.

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

@netlify

netlify Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit cef490f
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a7c4a2a0bc349000819743c

@netlify

netlify Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

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

@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.

@skevetter
skevetter marked this pull request as ready for review August 12, 2026 14:36
@skevetter
skevetter merged commit 5ea09f6 into main Aug 14, 2026
67 checks passed
@skevetter
skevetter deleted the lint-fixer/dockerinstall-codename-consts branch August 14, 2026 01:39
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.

1 participant