Expand description
Structural heuristics for GoF pattern detection.
Each heuristic checks for structural evidence of a pattern — not proof. They are intentionally permissive to avoid false negatives: it’s better to verify a module that loosely matches than to miss one that clearly does.
A heuristic returning true means “there is structural evidence consistent
with this pattern.” It does NOT mean “this code correctly implements the
pattern.” The promotion from planned to verified reflects structural
alignment, not behavioral correctness.
Functions§
- check_
adapter - Check if Rust source code structurally matches the Adapter pattern.
- check_
builder - Check if Rust source code structurally matches the Builder pattern.
- check_
command - Check if Rust source code structurally matches the Command pattern.
- check_
decorator - Check if Rust source code structurally matches the Decorator pattern.
- check_
facade - Check if Rust source code structurally matches the Facade pattern (H3).
- check_
factory - Check if Rust source code structurally matches the Factory pattern.
- check_
module_ pattern - Scan all
.rsfiles in a module’s source directory for structural evidence. - check_
observer - Check if Rust source code structurally matches the Observer pattern (H1).
- check_
pattern - Run the appropriate heuristic for a named GoF pattern.
- check_
singleton - Check if Rust source code structurally matches the Singleton pattern.
- check_
strategy - Check if Rust source code structurally matches the Strategy pattern (H2).