Skip to content

fix(cli): resolve linter violations and function complexity - #1778

Merged
skevetter merged 1 commit into
mainfrom
fix/lint-errors-fan-out-workflows
Nov 6, 2026
Merged

skevetter merged 1 commit into
mainfrom
fix/lint-errors-fan-out-workflows

Conversation

@skevetter

Copy link
Copy Markdown
Contributor

Cause

The CLI codebase accumulated cyclomatic complexity and function length violations flagged by golangci-lint (rules cyclop, funlen, and funcorder), and desktop provider tests contained ${...} string literals flagged by Biome rule noTemplateCurlyInString.

Fix

  • Move NewComposeHelper constructor before struct methods in pkg/compose/helper.go.
  • Decompose ensureComposeContainer, buildComposeOverrideArgs, and generateComposeUpOverride in pkg/devcontainer/compose.go.
  • Extract directory and WSLg validation helpers from validateComposeInvocationHeader in pkg/devcontainer/config_overlay_lifecycle.go.
  • Extract shouldPushPrebuild predicate in pkg/devcontainer/prebuild.go.
  • Extract checkSelectionBeforeInitialize and runContainerWithStatus helpers in pkg/devcontainer/run.go.
  • Construct expression defaults via array join without template interpolation in ProviderSheet.test.ts and ProviderWizard.test.ts.

Test evidence

Commit SHA: 01e4a55

  • mise run cli:lint: 0 issues.
  • mise run cli:lint:ci: 0 issues.
  • mise run desktop:check: 5107 files checked, 0 errors, 0 warnings.
  • go test ./pkg/compose/... ./pkg/devcontainer/...: 11 package suites passed, 0 failed.
  • npm run --prefix desktop test src/renderer/src/lib/components/provider/ProviderSheet.test.ts src/renderer/src/lib/components/provider/ProviderWizard.test.ts: 2 test files passed, 68 tests passed, 0 failed.

Not verified

Full desktop E2E Playwright test suite and live container runtime deployments.

@netlify

netlify Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 01e4a55
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6aed401b760cf69b53850113

@coderabbitai

coderabbitai Bot commented Nov 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bfedc486-347b-408f-b79e-68bbed081ae1
Commits

Reviewing files that changed from the base of the PR and between 637c520 and 01e4a55.

Files selected for processing: 7

  • desktop/src/renderer/src/lib/components/provider/ProviderSheet.test.ts
  • desktop/src/renderer/src/lib/components/provider/ProviderWizard.test.ts
  • pkg/compose/helper.go
  • pkg/devcontainer/compose.go
  • pkg/devcontainer/config_overlay_lifecycle.go
  • pkg/devcontainer/prebuild.go
  • pkg/devcontainer/run.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@netlify

netlify Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

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

@skevetter

Copy link
Copy Markdown
Contributor Author

@greptileai review

@github-actions github-actions Bot added the size/l label Nov 6, 2026
@greptile-apps

greptile-apps Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge; no actionable issues were found.

Summary

This PR splits long CLI functions into smaller helpers and rewrites expression strings in desktop tests to satisfy the linters.

  • Compose startup keeps building and recording the same override details.
  • Saved Compose invocations keep the same directory and WSLg checks.
  • Prebuild images keep the same rules for when a separate push runs.
  • Container startup keeps its selection checks and status reporting in the same order.
  • Compose setup and provider tests keep their existing behavior.

Reviews (1) · Last reviewed commit: "fix(cli): resolve linter violations and ..." · Reviewed by Greptile

@skevetter
skevetter enabled auto-merge (squash) November 6, 2026 03:34
@skevetter
skevetter merged commit 09e4250 into main Nov 6, 2026
119 checks passed
@skevetter
skevetter deleted the fix/lint-errors-fan-out-workflows branch November 6, 2026 03:57
@mergify

mergify Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

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