Patterns
AntiSlop detects four categories of slop patterns.
Placeholder
Untracked placeholders that indicate incomplete work:
TODO:- Untracked TODO commentFIXME:- Indicates incomplete workHACK:- Poor solution that needs revisitingNOTE: important- Unnecessary NOTE commentsXXX- Urgent problems
Deferral
Language indicating temporary solutions:
for now- Temporary solution with no plan to revisittemp,temporary- Temporary code that becomes permanentquick implement- Euphemism for incompletesimplif- Often skips edge casesshortcut- Creates technical debtin production this would- Indicates prototype codethis should be- Indicates incomplete implementationthis would be- Defers proper implementation
Hedging
Uncertainty language in comments:
hopefully- Uncertainty about code behaviorshould work- Unsure if code actually worksapproximately,roughly- Code should be precisethis is a simple- Often means missing edge casesbasic implement- Incomplete implementation warningin a real world- Code that would be different in production
Stub
Empty or placeholder implementations:
MOCK- Mock implementation in production codeFAKE- Fake data or implementationDUMMY- Dummy value or placeholderSIMULATED- Simulated result for testingplaceholder,stub- Instead of actual implementationnot implemented,unimplemented- Explicitly unimplemented codehardcoded path- Hardcoded file paths or URLsmagic number- Unt constants without explanation
Adding Custom Patterns
Add to your antislop.toml:
[[patterns]]
regex = "(?i)your-pattern-here"
severity = "medium"
message = "Your custom message"
category = "placeholder"