Commit d08ee9c
committed
feat: implement spec 170 - module facade detection and scoring adjustment
Adds AST-based detection of Rust module facades to prevent false positives
in god object analysis. Well-organized files with proper submodule separation
receive significant score reductions (up to 90% for excellent organization).
Implementation details:
- Added ModuleFacadeInfo, PathDeclaration, and OrganizationQuality types
- Implemented detect_module_facade() with #[path] attribute parsing
- Created facade_scoring module with adjust_score_for_facade() function
- Integrated facade scoring into god object detection pipeline
- Added comprehensive unit tests for facade detection and scoring
Modified files:
- src/analysis/module_structure.rs: Added facade detection logic
- src/organization/god_object/metrics.rs: Integrated facade scoring
- src/organization/god_object_detector.rs: Compute facade info early
- src/priority/scoring/facade_scoring.rs: New scoring adjustment module
- src/priority/scoring/mod.rs: Added facade_scoring module
- src/output/unified.rs: Fixed clippy large_enum_variant warning
- specs/170-module-facade-detection.md: Removed after implementation
Relates to spec 1701 parent ec4225d commit d08ee9c
File tree
7 files changed
+577
-954
lines changed- specs
- src
- analysis
- organization
- god_object
- output
- priority/scoring
7 files changed
+577
-954
lines changed
0 commit comments