Expand description
§antislop
A blazing-fast, multi-language linter for detecting AI-generated code slop.
Antislop identifies lazy placeholders, hedging language, stubs, and deferrals commonly produced by quantized or rushed LLMs.
§Example
use antislop::{Config, Scanner};
let config = Config::default();
let scanner = Scanner::new(config.patterns).unwrap();
let content = "def foo():\n # TODO: implement\n pass\n";
let result = scanner.scan_file("example.py", content);§Slop Categories
- Placeholder: TODO, FIXME, HACK, NOTE, XXX comments
- Deferral: “for now”, “temporary”, “quick implementation”
- Hedging: “hopefully”, “should work”, “this is a simple”
- Stub: Empty functions near placeholder comments
Modules§
- config
- Configuration loading and management.
- detector
- Slop detection engine.
- filename_
checker - Filename convention checking.
- profile
- Community profiles for antislop.
- report
- Reporting and output formatting.
- walker
- Parallel file traversal with gitignore support.
Structs§
- Comment
- A comment extracted from source code.
- Config
- Main configuration structure.
- File
Scan Result - Result of scanning a single file.
- Filename
Check Config - Configuration for filename checking behavior.
- Filename
Checker - Filename convention analyzer.
- Finding
- A single slop finding.
- Pattern
- A single slop detection pattern.
- Profile
- A community profile containing slop detection patterns.
- Profile
Loader - Profile loader with support for multiple sources.
- Reporter
- Reporter for scan results.
- Scan
Summary - Summary of a scan operation.
- Scanner
- The main scanner.
- Walker
- Parallel file walker.
Enums§
- Error
- Error types for antislop.
- Format
- Output format.
- Pattern
Category - Category of slop pattern.
- Profile
Source - Source for loading a profile.
- Severity
- Severity level for a slop finding.
Constants§
- CONFIG_
FILES - Default configuration file names.
- VERSION
- Version information.
Type Aliases§
- Result
- Result type for antislop operations.