// Get the user's name
const name = user.name
// Loop through items
for (const item of items) {
total += item.price
} Deterministic line match: compares the comment text against the tokens of the following statement and flags near-restatements.
A single-line comment that restates exactly what the next line of code does. Removing it changes nothing for the reader.
Each example shows the exact code shape the rule is looking for, then the smallest version that keeps the intent without hiding risk or adding noise.
// Get the user's name
const name = user.name
// Loop through items
for (const item of items) {
total += item.price
} Deterministic line match: compares the comment text against the tokens of the following statement and flags near-restatements.
const name = user.name
for (const item of items) {
total += item.price
} Remove comments that mirror the next statement. If the line needs explanation, rename the variable or extract a small function so the code carries the meaning.
Agents narrate every step when generating code, then leave the narration in. The reader gets two copies of the same information.
ai-slop/trivial-comment
ai-slop
Deterministic line match: compares the comment text against the tokens of the following statement and flags near-restatements.
Comments explaining intent, edge cases, or units (rather than restating the statement) are not flagged.
Verbosity signals derive from SlopCodeBench and recurred across the first public scan batch.