Repository navigation
Conversation
📊 Automated PR Analysis
SummaryFixes rtk's cargo output filters for build, check, clippy, and test so that Review Checklist
Linked issues: #5064 Analyzed automatically by wshm · This is an automated analysis, not a human review. |
This was referenced Nov 17, 2026
KuSh
force-pushed
the
fix/cargo-d3-short
branch
3 times, most recently
from
November 18, 2026 00:23
46b5745 to
1f6890a
Compare
3 tasks done
…rough `--message-format=short` prints a diagnostic as `path:line:col: warning: …`, starting with the path, and the build/check handler and the clippy filter only read lines starting with `warning:` or `error`. A build with warnings reported a clean build, one with errors printed only the exit code, and clippy reported `No issues found` for a run with warnings and for one that failed. `cargo test` showed the last five lines of a short-format compile failure, dropping the diagnostics before them. The short format is already one line per diagnostic, which the user asked cargo for. When it is in effect, `rtk cargo build`, `check`, `clippy` and `test` now run cargo unfiltered, through the passthrough `rtk cargo` uses for a subcommand it has no filter for: inherited stdout and stderr and cargo's exit code. The human and JSON formats are filtered as before. The format is read from the arguments. Cargo replays the cached warnings of a crate it does not rebuild in the format they were first printed in, so a run without the flag after a short-format one can still print short warnings, which the human filter does not read, as on develop. The format in effect is read in one place, through the argument tokenizer, the way cargo reads it: every `--message-format` before `--`, each value split on `,`, ASCII case ignored. `human`, `short` and `json` set the format, and `json-diagnostic-short`, `json-diagnostic-rendered-ansi` and `json-render-diagnostics` refine a JSON one. A later occurrence does not win: cargo refuses two formats, or the same one twice (`--message-format=json --message-format=human`), before it builds anything, so those runs pass through as well and show cargo's own error. This replaces the last-occurrence rule the JSON routing used. Fixes rtk-ai#5064 Co-Authored-By: Claude Opus 5.5 <[email protected]>
KuSh
force-pushed
the
fix/cargo-d3-short
branch
from
November 28, 2026 02:27
1f6890a to
8bb3bec
Compare
4 tasks done
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
With
--message-format=short, cargo prints each diagnostic aspath:line:col: warning: …, starting with the path, and the build/check and clippy filters only read lines starting withwarning:orerror. A build with warnings reported a clean build, one with errors printed only the exit code, clippy reportedNo issues foundfor a run with warnings and for one that failed, and a short-formatcargo testwith compile errors kept only its last lines.The short format is already one line per diagnostic, which the user asked cargo for. When it is in effect,
rtk cargo build,check,clippyandtestnow run cargo unfiltered, through the passthroughrtk cargouses for subcommands it has no filter for.Behaviour changes
--message-formatbefore--, values split on,, ASCII case ignored,json-*values refining a JSON format.--message-format=JSON(upper case) now reaches the JSON filter, and a--message-formatafter--(the test binary's or clippy-driver's) no longer routes cargo's output.cargo testloses its one-line summary; it prints what cargo printed.Test plan
cargo fmt --all,cargo clippy --all-targets,cargo test --all --no-fail-fast(5,929 passed)LC_ALL=Ccargoshim: short and rejected formats match cargo stream for stream with its exit code, the human format and a format after--are still filteredFixes #5064
🤖 Generated with Claude Code