Code Complexity Checker
Cyclomatic complexity and nesting depth, computed per function and rolled up per file — across C++, Python, Java, TypeScript, JavaScript, and C#.
What "complexity" means in your report
Two numbers, the same thresholds in every supported language.
Cyclomatic complexity
Counts independent decision paths through a function — every if, loop, and branch adds one. It's the single largest factor in the health score, at a 35% weight.
Nesting depth
How many levels deep a function's blocks go. REPO-SIGHT flags a file once its deepest function passes 6 levels, the same threshold across all six languages.
Function length
Functions over 100 lines are flagged for every language — often the easiest complexity signal to act on, since splitting a function is usually mechanical.
Project-wide rollup
Complexity is computed per function, then rolled up per file and per language, so you can see whether it's one bad file or a pattern across the codebase.
Frequently asked questions
What's a "good" complexity density?
The health score scores complexity density (cyclomatic complexity relative to lines of code) against a reference of 0.15 for healthy code and 0.50 for code that needs attention — it's the biggest single factor in the overall grade, at 35%.
Why does nesting depth matter separately from complexity?
A function can have modest cyclomatic complexity but still nest 6+ levels deep, which is its own readability problem — that's why REPO-SIGHT scores it separately, at a 10% weight, with a good/bad reference of 3 and 8.
Does complexity scoring work the same across all six languages?
Yes — the nesting-depth threshold (6) and function-length threshold (100 lines) are identical in every supported language, so complexity numbers are comparable across a polyglot repo.
How do I actually reduce a high complexity score?
Splitting long functions and flattening deep conditionals (early returns instead of nested if/else) are usually the fastest wins — both map directly to the two metrics above.
Related reading
By language
Scan a repository in seconds.
No tiers and no paywalled metrics; a small amount of advertising pays for hosting. Sign-in is optional for public repositories and required for private ones.