Numbered placeholder name
This is how the comment reads inline, under the flagged line.
Why it matters
data2, result3 mean the author ran out of names. The reader has to trace where each one came from.
What to do
Name it for what it holds: overdueLoans, memberRow.
Examples
const data2 = await load(id);
const overdueLoans = await load(id);
What it catches
It reads a pattern on each line, aware of strings and comments. Languages: TypeScript and JavaScript, Python. Scope: All files. These cases are the rule's own tests: the first set must be flagged and the second must not.
Flagged
const data2 = await load();
src/app.py
result2 = run()
Left alone
const users = await load();
Research
Numbered or vague names (`data2`, `result2`, `tmp1`, `do_stuff`). The name hides what the value is.
- Detecting AI slop in codebases
- skill: code-review
Turn it off or change it
In a config file for the CLI, or in the API's rules field:
{
"rules": {
"disable": [
"numbered-name"
],
"severity": {
"numbered-name": "medium"
}
}
}
const data2is a numbered stand-in, not a name.