| Crates.io | antislop |
| lib.rs | antislop |
| version | 0.3.0 |
| created_at | 2026-01-01 12:22:07.589676+00 |
| updated_at | 2026-01-07 11:19:23.506234+00 |
| description | A blazing-fast, multi-language linter for detecting AI-generated code slop |
| homepage | https://github.com/skew202/antislop |
| repository | https://github.com/skew202/antislop |
| max_upload_size | |
| id | 2016116 |
| size | 433,827 |
A blazing-fast, multi-language linter for detecting AI-generated code slop.
Antislop helps you maintain code quality by identifying lazily generated code, deferrals, hedging, and placeholders often left behind by AI coding assistants.
AI models often produce code that works but is littered with signs of hesitation or incompleteness. Antislop detects:
TODO, FIXME, HACK, XXX commentstodo!()// increments iAntislop is built on First Principles:
TODO or for now signal a gap between what was intended and what was built.We believe that AI generated code should be treated with Zero Trust. Verify everything.
We follow a Mutually Exclusive, Collectively Exhaustive strategy with standard linters like MegaLinter.
eslint or clippy catches it by default, Antislop will not cover it (unless explicitly whitelisted).| Feature | Antislop | Standard Linters (ESLint/Clippy) | AI Refactors |
|---|---|---|---|
| Focus | Intent & Completeness | Syntax & Best Practices | Improvements |
| Speed | Milliseconds | Seconds/Minutes | Slow |
| Parsing | Hybrid (Regex + AST) | AST Only | AST/LLM |
| Target | AI Slop | Bugs/Style | Refactoring |
| LSP | Yes | Yes | Sometimes |
$ antislop src/
src/main.rs:42:15: CRITICAL [stub]
! Empty function body found
→ fn calculate_metrics() { todo!() }
src/legacy.py:10:5: MEDIUM [deferral]
! Deferral phrase detected
→ # for now we just return True
src/utils.js:5:1: LOW [noise]
! Redundant comment
→ // utility function
────────────────────────────────────────────────────────────
📁 15 scanned, 3 with findings
⚠ 3 total findings
💀 75 sloppy score
⚠⚠⚠ High slop detected
Antislop uses tree-sitter AST parsing for accurate detection. Regex-only mode is ~10x faster.
| Language | Mode | Time | Throughput |
|---|---|---|---|
| Python | AST | 4.0 ms | 416 KiB/s |
| JavaScript | AST | 1.5 ms | 856 KiB/s |
| TypeScript | AST | 4.9 ms | 381 KiB/s |
| Go | AST | 1.3 ms | 1.2 MiB/s |
| Rust | AST | 3.6 ms | 606 KiB/s |
| Python | Regex | 0.47 ms | — |
| Rust | Regex | 0.54 ms | — |
Scaling:
| Lines | Time |
|---|---|
| 1,000 | 10.5 ms |
| 10,000 | 78 ms |
| 50,000 | 392 ms |
Benchmarks run on standard laptop hardware (Linux x86_64). Run cargo bench to reproduce.
# via npm (downloads platform-specific binary)
npm install -g antislop
# via cargo-dist (Shell)
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/skew202/antislop/releases/latest/download/antislop-installer.sh | sh
# via Homebrew
brew install skew202/tap/antislop
# via PowerShell
powershell -c "irm https://github.com/skew202/antislop/releases/latest/download/antislop-installer.ps1 | iex"
cargo install antislop
# Scan current directory
antislop
# Scan specific paths
antislop src/ tests/
# JSON output (for integration)
antislop --json
# Custom config
antislop -c custom-config.toml
Antislop follows a Zero False Positive philosophy for its default core.
--profile antislop-strict): Maximum coverage. Detects all forms of slop.--profile antislop-standard): Recommended Baseline. Adds checks for deferrals ("for now"), hedging ("should work"), and dummy data.--profile antislop-strict): Maximum coverage.# Recommended for most projects
antislop --profile antislop-standard src/
| Profile | Focus | Best For |
|---|---|---|
| Core | TODO, FIXME, Stubs |
CI Pipelines (Blocker) |
| Standard | + Deferrals, Hedging, Mock Data | Daily Development |
| Strict | + Nitpicks, Style Enforced | Code Audits |
GitHub Actions Example:
jobs:
antislop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Antislop
run: curl -sSf https://raw.githubusercontent.com/skew202/antislop/main/install.sh | sh
- name: Run Scan
run: antislop --profile antislop-standard .
Antislop is modular. You can optimize for binary size by choosing specific languages:
# Default (Standard Languages)
cargo install antislop
# Minimal (Regex only, no AST)
cargo install antislop --no-default-features --features parallel
# Specific Languages (Tiny binary)
cargo install antislop --no-default-features --features python,rust
# All Languages (inc. C#, PHP, Ruby, Kotlin, etc.)
cargo install antislop --features all-langs
Create antislop.toml in your project root to customize patterns:
file_extensions = [".py", ".rs", ".js", ".ts"]
[[patterns]]
regex = "(?i)TODO:"
severity = "medium"
message = "Placeholder comment found"
category = "placeholder"
| Language | Extension | Support Level |
|---|---|---|
| C/C++ | .c, .cpp |
Full (AST + Regex) |
| C# | .cs |
Full (AST + Regex) |
| Go | .go |
Full (AST + Regex) |
| Haskell | .hs |
Full (AST + Regex) |
| Java | .java |
Full (AST + Regex) |
| JavaScript | .js |
Full (AST + Regex) |
| Kotlin | .kt |
Regex Only |
| Lua | .lua |
Full (AST + Regex) |
| Perl | .pl |
Regex Only |
| PHP | .php |
Regex Only |
| Python | .py |
Full (AST + Regex) |
| R | .r |
Regex Only |
| Ruby | .rb |
Full (AST + Regex) |
| Rust | .rs |
Full (AST + Regex) |
| Scala | .scala |
Full (AST + Regex) |
| Swift | .swift |
Regex Only |
| TypeScript | .ts |
Full (AST + Regex) |
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.