Code complexity
Garth measures complexity at the function level using two complementary metrics:Cyclomatic complexity
Measures the number of independent execution paths through a function. High cyclomatic complexity means more test cases are needed and the code is harder to change safely.
Cognitive complexity
Captures how difficult code is to read and understand, accounting for nesting depth, control flow breaks, and logical operators — a better proxy for human comprehension than cyclomatic complexity alone.
Duplicate code
Garth scans the codebase for repeated blocks of logic that have been copy-pasted across files or modules.Duplicate block detection
Identifies code blocks that are identical or near-identical across different files. Each finding shows the affected locations so you can consolidate them into a shared utility.
Duplication percentage
Reports the overall duplication ratio for the repository, giving you a high-level view of how much of the codebase consists of repeated logic.
