fix: prettier false positive when not installed (#221)#359
Merged
pszymkowiak merged 3 commits intomasterfrom Mar 6, 2026
Merged
fix: prettier false positive when not installed (#221)#359pszymkowiak merged 3 commits intomasterfrom
pszymkowiak merged 3 commits intomasterfrom
Conversation
Empty or failed prettier output was incorrectly treated as "all files formatted". Now detects empty output and non-zero exit code, shows the actual error message instead of a false positive.
- Add cargo (build/test/clippy/check), diff, smart, wc, curl, wget sections - Fix Python commands: use dedicated rtk ruff/pytest instead of rtk test - Fix Go commands: use dedicated rtk go/golangci-lint, add go build/vet - Make BENCH_DIR absolute so debug files work from temp fixture dirs - Fallback to installed rtk if target/release/rtk not found
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rtk prettierreported "All files formatted correctly" when prettier wasn't installed or produced no output. Now shows the actual error from stderr instead.test-all.sh(69 → 118) covering rewrite, verify, proxy, discover, diff, wc, smart, json edge cases, docker, and hook check.benchmark.sh(cargo, diff, smart, wc, curl, wget), fixed Python/Go commands to use dedicated filters, fixed relative path bug with temp fixture dirs.Changes
src/prettier_cmd.rsfilter_prettier_output()for empty/whitespace-only inputtest_filter_empty_output,test_filter_whitespace_only_outputscripts/test-all.shassert_fails()helper for expected-failure testsscripts/benchmark.shrtk ruff check .instead ofrtk test ruff check .rtk golangci-lint runinstead ofrtk test golangci-lint run, addedgo build/go vetBENCH_DIRnow absolute (fixes debug file writes from temp dirs)target/release/rtknot foundTest plan
cargo test— all tests pass including 2 new prettier testscargo clippy— no warningsbash scripts/test-all.sh— 118 assertionsbash scripts/benchmark.sh— all sections runFixes #221
🤖 Generated with Claude Code