Show HN: Sloppylint – A linter for AI-generated Python code

https://github.com/rsionnach/sloppylint
AI coding assistants are productive but sloppy. They produce code that looks right but:

- Imports packages that don't exist - Uses placeholder functions that do nothing - Leaks patterns from JavaScript, Java, Ruby into Python - Leaves behind dead code and duplicates - Uses mutable default arguments

I built sloppylint to catch these "AI slop" patterns before they hit production.

     pip install sloppylint
     sloppylint .
It detects 100+ patterns across categories: - Hallucinated imports (20% of AI imports reference non-existent packages) - Placeholder code (`pass`, `...`, `TODO`) - Wrong-language patterns (.push(), .equals(), .forEach()) - Mutable defaults, bare excepts, dead code

This isn't a replacement for traditional linters - it catches the specific mistakes AI makes that humans wouldn't.

https://github.com/rsionnach/sloppylint

Comments

a_t48Dec 6, 2025, 12:28 AM
This is neat, though some of it (mutable defaults for example) are already covered by existing linters. I’d also look into pre-commit support as well.
zahlmanDec 6, 2025, 12:36 AM
How did you decide on the patterns to check?
jollysadfaceDec 6, 2025, 4:10 AM
why