Skip to main content
ai-slop/unknown-directivemanual fix

Unknown suppression directive.

A comment such as `// aislop-ignore-nextline` whose scope is not a real directive. It looks like a suppression and suppresses nothing.

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.

unknown-directive.ts
✗ Flagged
export function start(port: number) {
  // aislop-ignore-nextline ai-slop/console-leftover
  console.log(`server listening on ${port}`)
}
Why this trips

Deterministic comment match: flags `aislop-ignore-<scope>` inside a comment when the scope is not `next-line`, `line`, or `file`, and suggests the closest valid spelling. Runs on source and test files.

unknown-directive.ts
✓ Clean
export function start(port: number) {
  // aislop-ignore-next-line ai-slop/console-leftover -- startup banner for operators
  console.log(`server listening on ${port}`)
}
What changed

Use `aislop-ignore-next-line`, `aislop-ignore-line`, or `aislop-ignore-file`, followed by the rule id and a reason after `--`.

Agents told to silence a finding guess the directive name from similar tools and produce near-miss spellings.

How this rule is justified.

Rule id

ai-slop/unknown-directive

Enforcing engine

ai-slop

Detector strategy

Deterministic comment match: flags `aislop-ignore-<scope>` inside a comment when the scope is not `next-line`, `line`, or `file`, and suggests the closest valid spelling. Runs on source and test files.

Legitimate code that is NOT flagged

`aislop-ignore-next-line`, `aislop-ignore-line`, `aislop-ignore-file`, a bare `aislop-ignore`, directive-like text inside strings, and files outside JS/TS, Python, C#, C/C++, and Go are not flagged.

Evidence

Part of aislop's rule set, scored in the style tier because a misspelled suppression is a configuration mistake rather than a code defect.