Skip to content

feat(doctor): improve output format, fix bugs, and add --dry-run#222

Merged
avihut merged 2 commits intomasterfrom
improve-doctor
Feb 18, 2026
Merged

feat(doctor): improve output format, fix bugs, and add --dry-run#222
avihut merged 2 commits intomasterfrom
improve-doctor

Conversation

@avihut
Copy link
Owner

@avihut avihut commented Feb 18, 2026

Summary

  • Rewrites daft doctor output to a Flutter-doctor-inspired format with [✓]/[!]/[✗]/[−] status symbols
  • Fixes bare repo misdetection (was reporting non-bare when run inside a worktree of a bare repo)
  • Fixes worktree counting (was including the bare repo entry in the count)
  • Adds missing git-worktree-branch-delete to expected symlinks (now 11/11)
  • Adds shortcut symlink checks per enabled style
  • Adds shell wrapper active check (auto-cd enabled)
  • Adds YAML daft.yml hook detection to the Hooks category
  • Embeds fix closures directly in CheckResult (eliminates string-matching dispatch)
  • Adds --dry-run flag to preview fixes without applying them (daft doctor --fix --dry-run)

Test plan

  • mise run clippy passes with zero warnings
  • mise run test-unit all 333 tests pass
  • daft doctor inside a bare-repo worktree shows correct layout/counts
  • daft doctor outside any git repo shows only Installation section
  • daft doctor -v shows skipped checks
  • daft doctor -q shows only warnings/failures
  • daft doctor --fix --dry-run lists fixable issues without applying them
  • daft doctor --dry-run (without --fix) shows clap error

🤖 Generated with Claude Code

avihut and others added 2 commits February 18, 2026 07:59
Redesign daft doctor with Flutter-doctor-inspired output where every
line is self-explanatory. Key changes:

- Fix bare repo misdetection: read git config instead of rev-parse
  --is-bare-repository (which returns false inside worktrees)
- Fix worktree counting: skip bare repo entry in porcelain output
- Add git-worktree-branch-delete to expected symlinks (now 11)
- Add shortcut symlink checks (detects partially-installed styles)
- Add shell wrapper check (verifies auto-cd is active)
- Add hooks config detection via daft.yml (not just .daft/hooks/)
- Non-bare repo is now a pass, not a warning
- Replace fixable bool with fix closure (self-contained checks)
- New output format: [symbol] name (message) for pass, dash for issues
- Hide skipped checks by default (shown with -v)
- Summary shows issue names: "1 warning (Shortcuts)"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@avihut avihut merged commit 9059672 into master Feb 18, 2026
6 checks passed
@avihut avihut deleted the improve-doctor branch February 18, 2026 06:07
@avihut avihut self-assigned this Feb 18, 2026
@avihut avihut added the fix Bug fix label Feb 18, 2026
@avihut avihut added this to the v1.1.0 milestone Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant