fix(clippy): show full error blocks instead of truncated headline#1141
Merged
aeppling merged 1 commit intortk-ai:developfrom Apr 10, 2026
Merged
fix(clippy): show full error blocks instead of truncated headline#1141aeppling merged 1 commit intortk-ai:developfrom
aeppling merged 1 commit intortk-ai:developfrom
Conversation
Previously `filter_cargo_clippy` only captured the first line of each error diagnostic (truncated to 160 chars), discarding the file location, code snippet, `^` markers, and `= note:` context that developers need to actually fix the issue. This made rtk unusable for `cargo clippy -- -D warnings`. Now errors are collected as full multi-line blocks (up to 15 lines each, up to 10 errors total), matching the approach used by `filter_cargo_build`. Warning grouping by lint rule is unchanged. Fixes rtk-ai#602 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ad720ef to
f4074f8
Compare
Contributor
|
Hey @ousamabenyounes , glad to have you back on RTK repo :) Fix is clean, allowing 10line of error block which should be enough to display all required informations. |
aeppling
approved these changes
Apr 10, 2026
Contributor
|
Thanks for contributing to filter quality :) |
Contributor
Author
|
Thanks, really appreciate it! I’m working on this with my AI agents and a strong focus on quality — this project really matters to me because it brings real value (both economically and environmentally). Kudos to you for building such a great momentum, and proud to contribute my piece to it ! |
Merged
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
filter_cargo_clippycollected only the first line of each error (error: ...truncated to 160 chars), discarding the-->location, code snippet (|), and= note:/help:lines that make a compiler error actionable-D warningsall warnings become errors — devs saw"cargo clippy: 3 errors, 0 warnings"but no information about what to fixfilter_cargo_build). Each block collects up to 15 lines; up to 10 blocks shown. Warning grouping by lint rule is unchanged.Before / After
Before:
After:
Test plan
test_filter_cargo_clippy_shows_full_error_block— headline + location + code context all showntest_filter_cargo_clippy_multiple_errors_show_all_blocks— both error locations showntest_filter_cargo_clippy_*tests pass (updated section header check:"Errors:"not"Error details:")cargo fmt --all && cargo clippy --all-targets && cargo test --all✅Fixes #602
🤖 Generated with Ora Studio