Why Linters Miss AI Slop in AI Generated Code
A linter asks whether the file is well formed. AI slop asks whether the agent left work behind.
Linters are necessary. They are not a complete code quality check for AI generated code. Agents produce files that are formatted, typed enough to compile, and still full of residue a careful human would have deleted.
What linters already catch
Unused imports, some unsafe APIs, complexity in some languages, formatting if you wired a formatter. That is real work. It is also the work agents already tend to pass, because the model has seen lint-clean examples.
What they often miss
- Empty or comment-only catch blocks that hide failure
- Narrative comments above self-explanatory code
- Helpers from a discarded approach that still compile
- Unexplained
as anyto silence the checker - TODO stubs that survived into the PR
Those are AI slop patterns. aislop scores them. Sonar and ESLint may flag a subset if you configured them to. Do not assume they did. Comparison: aislop vs SonarQube.
The stack
Formatter, linter, tests, then a deterministic AI slop scan, then a person on intent. That is code quality for AI generated code. Command: npx aislop scan.
Frequently asked questions
Why doesn't my linter catch AI slop?
Most linters score style and known bugs. They do not treat narrative comments, leftover helpers, or silent catches as first-class AI generated code quality issues unless you add rules for them.
Is SonarQube enough for AI generated code?
SonarQube is broad code assurance. It is not a substitute for a focused AI slop gate. Overlap depends on your profile. See aislop vs SonarQube.
Should I replace ESLint with aislop?
No. Keep the language toolchain. Add a scan for named residue and a score you can gate.