Skip to content

fix(cli): tidy init help and test isolation#3

Merged
ss-o merged 1 commit into
mainfrom
bug-2-review-cleanups
May 19, 2026
Merged

fix(cli): tidy init help and test isolation#3
ss-o merged 1 commit into
mainfrom
bug-2-review-cleanups

Conversation

@ss-o
Copy link
Copy Markdown
Member

@ss-o ss-o commented May 18, 2026

Summary

  • remove the misleading --version entry from zunit init --help
  • make the missing-config CLI regression test self-contained by stubbing its required commands locally
  • align yamllint comment spacing with Prettier output so the current Trunk gate stays green after the release workflow landed

Why

PR #2 surfaced a few useful review notes after its substantive work had already been superseded by PR #1. Two still apply on current main: init --help advertises a global flag as if it were init-specific, and one CLI test relies on ambient host dependencies.

While rebasing onto current main, Trunk also exposed a formatter/linter config mismatch introduced by the newer release workflow: Prettier emits one space before an inline YAML comment, while yamllint's default expected two. The config now accepts Prettier's output instead of forcing a formatter conflict.

Verification

  • PATH="$tmpbin:$PATH" ./zunit --tap tests/cli.zunit tests/reports.zunit → 10/10 passing
  • PATH="$tmpbin:$PATH" ./zunit --tap tests → 112/112 passing
  • zsh -n src/commands/init.zsh tests/cli.zunit
  • trunk check --all --no-fix --no-progress✔ No issues
  • YAML parse for .trunk/configs/.yamllint.yaml and .github/workflows/release.yml
  • git diff --check

@ss-o ss-o force-pushed the bug-2-review-cleanups branch from dce9444 to 1957564 Compare May 19, 2026 02:11
@ss-o ss-o marked this pull request as ready for review May 19, 2026 02:19
Copilot AI review requested due to automatic review settings May 19, 2026 02:19
@ss-o ss-o merged commit 6d4057d into main May 19, 2026
3 checks passed
@ss-o ss-o deleted the bug-2-review-cleanups branch May 19, 2026 02:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Small follow-up cleanup addressing review notes from PR #2 that still apply on main, plus a yamllint/Prettier reconciliation needed after the release workflow landed.

Changes:

  • Remove the spurious --version entry from zunit init --help output and assert its absence in the help test.
  • Make the missing-config CLI test self-contained by stubbing revolver and color and pinning PATH instead of relying on host binaries.
  • Relax yamllint's comments.min-spaces-from-content to 1 to match Prettier's output.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/commands/init.zsh Drops the misleading -v, --version line from the init usage text.
tests/cli.zunit Stubs revolver/color and overrides PATH for the no-config test; adds negative assertion for --version in init help.
.trunk/configs/.yamllint.yaml Adds comments.min-spaces-from-content: 1 to align with Prettier formatting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants