Will It Vibe?
CQ-005Medium severity-8 points

Long function (JS/TS)

Part of Code Quality & Syntax, which counts for 20% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.

What it detects

Functions longer than ~80 lines are a strong readability and testability smell.

Why it matters

A function past roughly 80 lines almost always interleaves several steps that can fail independently, which makes each step hard to test and easy to break while editing another. Reviewers skim long functions, so bugs in them survive review more often.

How to fix it

Find the natural phases of the function (validate, fetch, transform, render) and extract each into a small named function with explicit parameters and a return value, leaving the original as a short sequence of calls. Prefer early returns over accumulating nested state. Your editor's "extract function" refactor keeps this mechanical and safe.

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

Related Code Quality & Syntax checks