Skip to content

Coupling check false positive: generated l10n files flagged when ARB sources are unstaged #185

@SimplyLiz

Description

@SimplyLiz

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

  1. Modify .arb source files (app_en.arb, app_de.arb, app_pl.arb)
  2. Run flutter gen-l10n which regenerates app_localizations.dart, app_localizations_en.dart, etc.
  3. Stage only the generated files (or have .arb files in MM state — staged + further unstaged modifications)
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions