Summary
The coupling check produces false positives for Flutter localization files when the .arb source files are modified but unstaged (MM git status), while the generated app_localizations_*.dart files are staged.
Reproduction
- Modify
.arb source files (app_en.arb, app_de.arb, app_pl.arb)
- Run
flutter gen-l10n which regenerates app_localizations.dart, app_localizations_en.dart, etc.
- Stage only the generated files (or have
.arb files in MM state — staged + further unstaged modifications)
- Run
ckb review --staged --format=json
Observed
8 coupling warnings:
[warning] lib/l10n/app_localizations.dart — Missing co-change: lib/l10n/app_en.arb (88% co-change rate)
[warning] lib/l10n/app_localizations.dart — Missing co-change: lib/l10n/app_pl.arb (86% co-change rate)
[warning] lib/l10n/app_localizations_de.dart — Missing co-change: lib/l10n/app_pl.arb (90% co-change rate)
[warning] lib/l10n/app_localizations_de.dart — Missing co-change: lib/l10n/app_de.arb (88% co-change rate)
[warning] lib/l10n/app_localizations_en.dart — Missing co-change: lib/l10n/app_en.arb (91% co-change rate)
[warning] lib/l10n/app_localizations_en.dart — Missing co-change: lib/l10n/app_de.arb (89% co-change rate)
[warning] lib/l10n/app_localizations_pl.dart — Missing co-change: lib/l10n/app_pl.arb (88% co-change rate)
[warning] lib/l10n/app_localizations_pl.dart — Missing co-change: lib/l10n/app_de.arb (88% co-change rate)
Expected
No coupling warning, since the .arb files are modified — they're just in MM state (staged with further unstaged modifications). The coupling check in --staged mode should recognize that files with staged changes satisfy the co-change expectation, even if they also have additional unstaged changes.
Environment
ckb version: 8.2.0
- Flutter project with
flutter gen-l10n code generation
- Git status of
.arb files: MM (staged + unstaged modifications)
🤖 Generated with Claude Code
Summary
The
couplingcheck produces false positives for Flutter localization files when the.arbsource files are modified but unstaged (MMgit status), while the generatedapp_localizations_*.dartfiles are staged.Reproduction
.arbsource files (app_en.arb,app_de.arb,app_pl.arb)flutter gen-l10nwhich regeneratesapp_localizations.dart,app_localizations_en.dart, etc..arbfiles inMMstate — staged + further unstaged modifications)ckb review --staged --format=jsonObserved
8 coupling warnings:
Expected
No coupling warning, since the
.arbfiles are modified — they're just inMMstate (staged with further unstaged modifications). The coupling check in--stagedmode should recognize that files with staged changes satisfy the co-change expectation, even if they also have additional unstaged changes.Environment
ckbversion: 8.2.0flutter gen-l10ncode generation.arbfiles:MM(staged + unstaged modifications)🤖 Generated with Claude Code