Expand description
PARF (Pattern and Reference Finder) module (BATUTA-012)
Cross-codebase pattern analysis and reference finding for understanding code dependencies, usage patterns, and migration planning.
§Features
- Symbol References: Find all references to functions, classes, variables
- Pattern Detection: Identify common code patterns and idioms
- Dependency Analysis: Build dependency graphs across files
- Dead Code Detection: Find unused code that can be removed
- Call Graph Generation: Understand function call relationships
§Example
ⓘ
use batuta::parf::{ParfAnalyzer, SymbolKind};
let analyzer = ParfAnalyzer::new();
let refs = analyzer.find_references("my_function", SymbolKind::Function)?;
let patterns = analyzer.detect_patterns(&codebase)?;
let deps = analyzer.analyze_dependencies(&codebase)?;Structs§
- Dead
Code - Dead code analysis result
- File
Dependency - Dependency relationship between files
- Parf
Analyzer - PARF analyzer for cross-codebase analysis
- Symbol
Reference - A reference to a symbol in the codebase
Enums§
- Code
Pattern - Code pattern detected in the codebase
- Dependency
Kind - Type of dependency between files
- Symbol
Kind - Symbol kind for reference finding