Debug output left in
This is how the comment reads inline, under the flagged line.
Why it matters
Debug prints leak data into logs, cost I/O on hot paths and bury real log lines. debugger and breakpoint() stop the process.
What to do
Delete it, or use the project's logger at the right level.
Examples
console.log("user", user);logger.debug({ userId: user.id }, "loaded user");What it catches
It reads a pattern on each line, aware of strings and comments. Languages: TypeScript and JavaScript, Python. Scope: Shipped code only. These cases are the rule's own tests: the first set must be flagged and the second must not.
Flagged
console.log(user);
src/app.py
print(x)
debugger;
Left alone
logger.info(user.id);
scripts/run.py
print(x)
Research
`console.log`, `print`, `debugger` and `breakpoint()` left in shipped code. Debug output adds noise and can leak data.
Turn it off or change it
In a config file for the CLI, or in the API's rules field:
{
"rules": {
"disable": [
"debug-print"
],
"severity": {
"debug-print": "low"
}
}
}
console.logleft in shipped code.