Skip to main content

ovecc health

Code-health hotspots at function granularity: functions over the complexity thresholds (McCabe cyclomatic and SonarSource cognitive), plus oversized units (long functions, long parameter lists). Complexity is computed by the native TS/JS extractor.

Usage: ovecc health [OPTIONS]

Example

$ ovecc health
Code health: 1 high-complexity function(s), 0 oversized unit(s)

[High] High complexity: validateOrder (cyclomatic 24, cognitive 32)
src/services/orders.ts:8 (cyclomatic 24, cognitive 32)

A clean run says so explicitly:

Code health: 0 high-complexity function(s), 0 oversized unit(s)
(no functions over the complexity or size thresholds)

What's measured

SignalRuleThresholds
Cyclomatic complexitycomplexitymedium/high (per-function McCabe)
Cognitive complexitycomplexitymedium/high (per-function SonarSource)
Long functionlong-function75 lines (low) / 150 lines (medium)
Long parameter listlong-parameter-list7 params (low) / 10 params (medium)

Repo-wide aggregates (max_cyclomatic, max_cognitive, total_cognitive, high_complexity_functions, functions) are recorded at every index and trendable via history.

Options

The global options only.