Skip to main content
New aislop v0.13.1 patch — calibrates hidden-fallback detection and fixes regex comment-masker false positives. Read the changelog →
ai-slop/generic-naming manual fix

Generic naming.

Variables and parameters named `data`, `result`, `value`, `temp`, `obj`, `info`, `item`. Names that say "this is a noun" without saying which noun.

Flagged shape and clean shape.

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.

Flagged example
function process(data: any) {
  const result = data.map((item: any) => item.value * 2)
  return result
}
Why this trips

Deterministic AST match against a placeholder-name list, scoped to declarations the rule can rename safely.

Clean example
function doublePrices(products: Product[]): number[] {
  return products.map(product => product.price * 2)
}
What changed

Rename values around their domain role: `products`, `invoiceTotal`, `retryPolicy`, `parsedUser`. Remove `any` when the name is generic because the type was never modeled.

Without seeing how the value is used downstream, agents fall back to generic placeholders. The reader has to infer the role from context — every time.

How this rule is justified.

Rule id

ai-slop/generic-naming

Enforcing engine

ai-slop

Detector strategy

Deterministic AST match against a placeholder-name list, scoped to declarations the rule can rename safely.

Legitimate code that is NOT flagged

Conventional loop indices, generic type parameters, and short-lived locals in trivial scopes are not flagged.

Evidence

Naming-verbosity signals derive from SlopCodeBench, which tracked structural erosion in long-horizon tasks.