Skip to content

fix: export crane command type - #1048

Open
devsy-app[bot] wants to merge 3 commits into
mainfrom
fix/codefactor/crane-export-command
Open

fix: export crane command type#1048
devsy-app[bot] wants to merge 3 commits into
mainfrom
fix/codefactor/crane-export-command

Conversation

@devsy-app

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

Copy link
Copy Markdown
Contributor

Codefactor issue

  • Key: 6a77b13d5b1ec0b4ee20c455
  • File:line: pkg/devcontainer/crane/run.go:37
  • Category / Severity: Maintainability / Minor
  • Message: Exported func New returns unexported type *crane.command, which can be annoying to use.

Fix

Export the command struct as Command (and its method receivers) so the exported New constructor returns an exported *Command. The local variable in PullConfigFromSource that was named command is renamed to cmd to avoid shadowing the now-exported type name.

The change is purely a naming/export change — no behavioral change. New, WithFlag, WithArg, and Run keep the same signatures (now returning *Command).

Verification

  • task cli:format â�� clean (gofmt/gci/gofumpt via golangci-lint fmt)
  • task cli:lint:ci â�� 0 issues
  • task cli:test â�� all packages pass except the known pre-existing pkg/git TestRepoClone* failures (stale assertion on origin/main, unrelated to this change which does not touch pkg/git)

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

Export the crane command type so New returns an exported *Command, resolving the Codefactor maintainability issue (exported func returns unexported type).
@netlify

netlify Bot commented Aug 14, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh canceled.

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

@devsy-app devsy-app Bot added the codefactor label Aug 14, 2026
@netlify

netlify Bot commented Aug 14, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 93555a4
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a838981c15a780008fbd1ff

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

@mergify

mergify Bot commented Aug 17, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant