Repository navigation
feat(dart): Dart & Flutter TOML filters (hardened from upstream PR #2456) - #1
Merged
Merged
Conversation
… PR rtk-ai#2456) Nine TOML-only filters: dart analyze/test/pub/format/build_runner, flutter analyze/test/pub/build. Based on rtk-ai#2456 by @vivekkartha, with the review blockers fixed: - No discover/rules.rs entries: rely on the TOML-only rewrite path (like jj/jq/just), which prefixes the full original command. This fixes the upstream blocker where 'dart run build_runner' was rewritten to the invalid native command 'dart build_runner'. - Test filters are failures-only: [E] compact-reporter lines are rewritten to a FAIL prefix via replace rules, then all remaining progress lines are stripped, so a late failure can never be buried under passing output or a head-truncation cap. - Analyzers accept both hyphen and bullet diagnostic formats, with leading indentation, and merge stderr (filter_stderr = true) so diagnostics emitted there don't bypass the filter. - build_runner gains a SEVERE generation-failure fixture; flutter build's plugin-list strip is tightened to bare identifiers. - dart format filter added (short-circuits on '(0 changed)'). - Rewrite-equivalence tests for every command, incl. passthrough for 'flutter run' and non-build_runner 'dart run'. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HkGFWjLXkKYwLJerVWwFjf
…, tail-truncate builds Driven by real Claude Code history from the investapp project: - 'flutter pub run build_runner build' (23 uses) was the dominant build_runner form — extend match to (dart|flutter) [pub] run. - 'flutter test --reporter json' (2 uses) is machine output; skip the hook rewrite (same rationale as the gh --json guard). - flutter-build / dart-build-runner now tail-truncate: compile errors and SEVERE blocks come at the end of the run. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HkGFWjLXkKYwLJerVWwFjf
felipematheus
marked this pull request as ready for review
July 21, 2026 22:49
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
Adds Flutter/Dart support as nine TOML-only filters, based on upstream rtk-ai/rtk#2456 by @vivekkartha, hardened per review findings. Upstream #669 and #2457 were evaluated and used only as sources of format knowledge ([E] failure markers, hyphen-format analyzer output) — both have correctness blockers.
Filters
[E]lines →FAILprefix, all passing progress stripped; short-circuit on all-pass(0 changed); changed files keptDivergences from upstream rtk-ai#2456 (deliberate)
discover/rules.rsentries. Upstream's rule rewrotedart run build_runner …→rtk dart build_runner …, and rtk's fallback then executes the invalid native commanddart build_runner …. This fork's TOML-only rewrite path (same as jj/jq/just) prefixes the full original command, sodart run build_runner build→rtk dart run build_runner build. Covered by rewrite-equivalence tests.replacerules mark[E]failure lines and the summary before the progress-line strip runs — the cumulative-Ncounter on post-failure passing lines is deliberately not treated as a failure signal (the feat(flutter): add Flutter command filters rtk-ai/rtk#669 bug).info -,info •, and indented diagnostics;filter_stderr = trueon analyze/test/build/build_runner so stderr diagnostics don't bypass filtering.flutter runand non-build_runnerdart runstay passthrough (interactive/streaming — must not go through the non-streaming TOML pipeline). Test-covered.dart format(CI usage:--output=none --set-exit-if-changed).Testing
cargo fmt --all && cargo clippy --all-targets && cargo test --all→ 2454 passed, 0 failedregistry.rsrtk rewrite 'dart run build_runner build --delete-conflicting-outputs'preservesrun;flutter runexits 1 (passthrough)🤖 Generated with Claude Code
https://claude.ai/code/session_01HkGFWjLXkKYwLJerVWwFjf