Habit details feature
61 findings · dominant: cross_feature_coupling
Avoid direct feature-to-feature imports.
Composite architecture score
This codebase shows early-stage coupling patterns that may reduce feature isolation as the team scales.
+88 additional similar findings in this category.
cross_feature_coupling reached its penalty cap — the score may understate severity for this rule.
61 findings · dominant: cross_feature_coupling
Avoid direct feature-to-feature imports.
46 findings · dominant: cross_feature_coupling
Avoid direct feature-to-feature imports.
15 findings · dominant: service_locator_abuse
Limit service locator usage to composition roots.
| Location | Total | Breakdown |
|---|---|---|
| lib/features/habit_details | 61 | cross_feature_coupling: 43 · service_locator_abuse: 13 · layer_violations: 4 · god_files: 1 |
| lib/features/habit_creation | 46 | cross_feature_coupling: 27 · hardcoded_scale_risks: 7 · service_locator_abuse: 5 · god_files: 4 · layer_violations: 3 |
| lib/features/habits | 15 | service_locator_abuse: 6 · god_files: 4 · cross_feature_coupling: 3 · hardcoded_scale_risks: 1 · layer_violations: 1 |
| lib/features/profile | 9 | service_locator_abuse: 5 · cross_feature_coupling: 3 · layer_violations: 1 |
| lib/features/achievements | 8 | cross_feature_coupling: 6 · service_locator_abuse: 2 |
| lib/features/home_page.dart | 6 | cross_feature_coupling: 6 |
| lib/features/settings | 5 | hardcoded_scale_risks: 2 · layer_violations: 2 · service_locator_abuse: 1 |
| lib/features/rewards | 4 | cross_feature_coupling: 3 · service_locator_abuse: 1 |
| lib/features/onboarding | 3 | layer_violations: 2 · service_locator_abuse: 1 |
| lib/core/navigation | 1 | god_files: 1 |
Features importing each other directly increase coupling and reduce scalability.
Avoid direct feature-to-feature imports. Move shared contracts into a shared domain layer or introduce an abstraction.
Global dependency access hides dependencies and reduces architectural clarity.
Limit service locator usage to composition roots. Inject dependencies explicitly into classes.
Crossing layer boundaries increases coupling and makes refactoring harder.
Ensure domain does not depend on data or presentation. Move implementations behind interfaces.
Large files increase change surface and reduce maintainability.
Split large files into smaller focused components. Separate responsibilities by layer or feature.
Hardcoded configuration reduces flexibility across environments.
Move configuration to environment-based or external config files. Avoid embedding runtime values in code.