Skip to main content

Module analyzers

Module analyzers 

Source
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

Traits§

Analyzer
FileAnalyzer

Functions§

analyze_file
compose_analyzers
get_analyzer
get_analyzer_with_context