Documentation
¶
Overview ¶
Package analyzer provides code analysis implementations for the ARS pipeline.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type C4Analyzer ¶
type C4Analyzer struct {
// contains filtered or unexported fields
}
C4Analyzer implements the pipeline.Analyzer interface for C4: Documentation Quality. It analyzes README presence, comment density, API doc coverage, and other documentation artifacts.
func NewC4Analyzer ¶
func NewC4Analyzer(tsParser *tsp.TreeSitterParser) *C4Analyzer
NewC4Analyzer creates a C4Analyzer. Tree-sitter parser is needed for Python/TS analysis. evaluator can be nil for static-only analysis.
func (*C4Analyzer) Analyze ¶
func (a *C4Analyzer) Analyze(targets []*types.AnalysisTarget) (*types.AnalysisResult, error)
Analyze runs the C4 documentation quality analysis.
Multi-language documentation analysis: - Go: Uses go/ast for doc comment detection and go/parser for comment counting - Python: Uses Tree-sitter to parse docstrings and comments - TypeScript: Uses Tree-sitter for JSDoc and comment analysis
Metrics collected: - C4-01: README presence and word count - C4-02: Comment density (comment lines / total lines * 100) - C4-03: API documentation coverage (documented APIs / total public APIs * 100) - C4-04: CHANGELOG presence - C4-05: Examples presence (directory or README code blocks) - C4-06: CONTRIBUTING guide presence - C4-07: Diagrams presence (architecture/design documentation)
Optional LLM-based evaluation (if Claude CLI available): - README clarity and completeness - Example code quality and usefulness - Overall documentation comprehensiveness
func (*C4Analyzer) Name ¶
func (a *C4Analyzer) Name() string
Name returns the analyzer display name.
func (*C4Analyzer) SetEvaluator ¶
func (a *C4Analyzer) SetEvaluator(eval *agent.Evaluator)
SetEvaluator enables CLI-based content quality evaluation.