This Flutter project exists to provide real command outputs for RTK to implement filtering support for Flutter/Dart commands.
Related issue: rtk-ai/rtk#1098
A Flutter counter app intentionally enriched with:
- Real dependencies (
http,provider,shared_preferences,intl,json_annotation) - Code generation with
json_serializableandmockito(build_runner targets) - Intentional lint issues across multiple files (20 issues across 3 files)
- Unit tests and widget tests with a mix of passing and intentional failures
Pre-captured outputs live in samples/. These are the raw fixtures RTK needs
to design its filter rules.
| File | Command | Purpose |
|---|---|---|
samples/flutter_pub_get.txt |
flutter pub get |
58 packages resolved, version conflicts shown |
samples/flutter_analyze.txt |
flutter analyze |
20 issues: 18 info, 2 warning across 3 files |
samples/flutter_test.txt |
flutter test |
11 passed, 3 failed — compact reporter |
samples/flutter_test_verbose.txt |
flutter test --reporter expanded |
Same, verbose format |
samples/build_runner_build.txt |
dart run build_runner build |
Fresh build — compiling builders + timing lines |
samples/build_runner_cached.txt |
dart run build_runner build |
Incremental — all skipped, 0 outputs |
samples/build_runner_errors.txt |
dart run build_runner build |
SEVERE error with file/line pointer (unsupported type) |
To regenerate samples after changing the code:
bash capture_samples.shRaw output: 60+ lines listing every resolved/downloaded package.
Desired RTK output:
Resolving dependencies... 58 added, 0 removed.
5 packages have newer versions incompatible with dependency constraints.
Run `flutter pub outdated` for details.
Filter strategy (TOML):
- Strip lines matching
^\+/^-(package download lines) — keep only summary line - Keep
Changed N dependencies!and outdated notice match_outputonNo dependencies changed→ short-circuit
Raw output: One line per issue with file path, line, column, rule name.
Desired RTK output:
20 issues found in 3 files (ran in 3.4s)
2 warnings, 18 info
lib/models/user.dart (8 issues)
warning unused_element _unusedPrivateMethod isn't referenced
info always_declare_return_types toJson missing return type
...
lib/services/api_service.dart (6 issues)
warning unused_local_variable 'unused' isn't used
info avoid_print Don't invoke 'print' (x3)
...
Filter strategy (TOML or Rust):
- Group issues by file
- Collapse duplicate lint rules (show count)
- Promote warnings above infos
match_outputonNo issues found!→ok (no issues)
Raw output: Live progress lines +N -M:, failure stack traces, summary.
Desired RTK output:
11 passed, 3 failed (1.2s)
FAILED test/unit/user_test.dart
x User model > age validation fails for negative age
Expected: > 0 Actual: -1 (Age should be positive but was -1)
x AdminUser > strict permission check fails for regular admin
Expected: true Actual: false
FAILED test/widget_test.dart
x Counter widget > counter starts at 5 - intentional failure
Expected: findsOneWidget Actual: found 0 widgets with text "5"
Filter strategy (Rust module — structured streaming):
- Suppress all
+N: loading ...lines - Suppress
+N -M: <test name>progress lines - Capture
[E]failure entries with their error block - Strip stack traces (keep only test file + line)
- Emit summary:
N passed, M failed match_outputonAll tests passed!→ short-circuit
Raw output: Compilation progress lines (Ns compiling builders/aot), per-builder status, warnings and errors with source pointers.
Three scenarios captured:
1. Fresh build (build_runner_build.txt) — 30+ lines of Ns compiling builders/aot, then builder status with timing:
6s json_serializable on 7 inputs: 1 output, 6 no-op; spent 4s analyzing
0s mockito:mockBuilder on 6 inputs: 1 output, 2 no-op
Built with build_runner/aot in 32s; wrote 3 outputs.
2. Cached/incremental (build_runner_cached.txt) — instant, nothing to do:
Built with build_runner/aot in 0s; wrote 0 outputs.
3. Error (build_runner_errors.txt) — SEVERE with file/line pointer:
E json_serializable on lib/models/product_broken.dart:
Could not generate `fromJson` code for `imageData`.
To support the type `Uint8List` you can:
* Use `JsonConverter` ...
13 │ final Uint8List imageData;
│ ^^^^^^^^^
Failed to build with build_runner/aot in 0s; wrote 0 outputs.
Filter strategy (TOML):
- Strip all
^\s+\ds compiling builders/aotlines (startup noise) - Strip
^\s+\ds .* skippedlines in clean runs - Keep
W(warning) andE(error) lines with their indented context block - Keep the final
Built/Failedsummary line - Short-circuit on
wrote 0 outputswith no errors →ok (nothing to rebuild)
prefer_typing_uninitialized_variables—var namealways_declare_return_types—toJson()missing return typeavoid_print— 2 occurrencesprefer_final_locals—var resultunused_element(warning) —_unusedPrivateMethod
avoid_print— 2 occurrencesprefer_final_locals— 3 occurrencesunused_local_variable(warning) —var unused
avoid_print— 2 occurrencesprefer_final_locals— 1 occurrenceprefer_const_constructors_in_immutables—MyAppconstructorprefer_single_quotes— 2 occurrences