Documentation
¶
Overview ¶
Package complexity runs a language's ComplexityCalculator across a diff's changed files and formats the results into a report.Section.
All AST-level work happens in the language back-end (for Go: internal/lang/goanalyzer/complexity.go). This package is now a thin orchestrator — threshold check, severity derivation, per-language stats summary — so new languages inherit the analyzer for free by implementing lang.ComplexityCalculator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Analyze ¶
func Analyze(repoPath string, d *diff.Result, threshold, deltaTolerance int, calc lang.ComplexityCalculator) (report.Section, error)
Analyze computes cognitive complexity for all functions in the diff's changed regions using the supplied language calculator, then produces the "Cognitive Complexity" report section. Parse errors are swallowed at the calculator layer (returning nil) so a single malformed file doesn't fail the whole run.
Types ¶
This section is empty.