Expand description
Language-specific code analyzers for parsing and extracting metrics.
This module contains analyzers for different programming languages (Rust, Python, JavaScript, TypeScript) that parse source code into ASTs and extract metrics like complexity, function signatures, and call graphs.
The module provides:
- Language-specific parsers using tree-sitter grammars
- Function and method extraction with purity detection
- Call graph analysis and construction
- Effect tracking (I/O, state mutations)
- Test and macro detection
§Architecture
Analyzers implement the Analyzer trait for unified file analysis, or
FileAnalyzer for debt-focused metrics. The enhanced analyzer provides
comprehensive analysis including call graphs and effect tracking.
Re-exports§
pub use enhanced_analyzer::AnalysisResult;pub use enhanced_analyzer::EnhancedAnalyzer;
Modules§
- batch
- Batch file analysis using stillwater’s traverse pattern.
- call_
graph - call_
graph_ integration - Call Graph Integration
- closure_
analyzer - Closure analysis for purity detection.
- context_
aware - Context-aware analyzer wrapper that integrates context detection
- custom_
macro_ analyzer - Custom Macro Heuristic Analysis
- effects
- Effect-based analyzers for project analysis (Spec 207).
- enhanced_
analyzer - file_
analyzer - function_
registry - go
- Go analyzer support.
- io_
detector - AST-based I/O operation detection for Rust code.
- macro_
definition_ collector - Macro Definition Collector
- purity_
detector - Purity detection for Rust functions
- python
- Python source code analysis
- rust
- Rust source code analysis
- rust_
call_ graph - rust_
complexity_ calculation - Pure complexity calculation functions for Rust code analysis.
- rust_
constructor_ detector - AST-based constructor detection for Rust
- rust_
data_ flow_ analyzer - AST-based data flow classification for Rust
- rust_
enum_ converter_ detector - AST-based enum converter detection for Rust
- scope_
tracker - Scope tracking for purity analysis.
- signature_
extractor - solidity
- Solidity analyzer support.
- state_
field_ detector - State Field Detector (Spec 202)
- state_
machine_ pattern_ detector - State Machine Pattern Detector
- test_
detector - trait_
implementation_ tracker - trait_
resolver - traits
- Local analyzer traits to decouple analyzer modules
- type_
registry - type_
tracker - typescript
- TypeScript/JavaScript source code analysis
- validation_
pattern_ detector - Validation Pattern Detector