Deep nesting
Part of Code Quality & Syntax, which counts for 20% of the overall score. When this check fires it deducts 4 points from that category, once per scan, no matter how many places it turns up.
What it detects
Code nested 6+ levels deep is a readability/complexity smell (indentation-based heuristic).
Why it matters
Code indented six or more levels deep forces a reader to hold that many conditions in their head to know when a line runs. Branches at that depth are rarely covered by tests, and they are where wrong-branch and off-by-one bugs live.
How to fix it
Flatten with guard clauses: invert conditions and return or continue early so the happy path stays at low indentation. Extract the innermost blocks into named functions, and where it stays readable replace nested loops-plus-ifs with filter/map in JS/TS or comprehensions and early continue in Python.
The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing
Does your repo trip this check?
Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.
Scan your repo