console.log call inside a loop body
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
A console.log/debug/info call sits inside a loop body. Each call is a synchronous write (to a terminal, a piped file, or the devtools console), so on a large collection this can dominate the loop's running time. Heuristic: this is often intentional debug output left in place; low severity and worth a second look before a hot path ships.
Why it matters
console.log/debug/info is a synchronous call (to a terminal, a piped log file, or the devtools console), and calling it inside a loop body means the loop's running time now includes however long that write takes on every iteration. On a small array this is invisible; over thousands of iterations, especially with a piped or redirected stdout, logging can end up dominating the loop's total time. This is very often just debug output the author forgot to remove, so it is low severity and worth a quick look rather than an automatic rewrite.
How to fix it
Remove the log call if it was left over from debugging. If the logging is intentional (progress reporting, audit trail), throttle it (log every Nth iteration, or only a summary after the loop) instead of logging on every single pass, or route it through a proper logger that batches/buffers writes.
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