Crate antislop

Crate antislop 

Source
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.
FileScanResult
Result of scanning a single file.
FilenameCheckConfig
Configuration for filename checking behavior.
FilenameChecker
Filename convention analyzer.
Finding
A single slop finding.
Pattern
A single slop detection pattern.
Profile
A community profile containing slop detection patterns.
ProfileLoader
Profile loader with support for multiple sources.
Reporter
Reporter for scan results.
ScanSummary
Summary of a scan operation.
Scanner
The main scanner.
Walker
Parallel file walker.

Enums§

Error
Error types for antislop.
Format
Output format.
PatternCategory
Category of slop pattern.
ProfileSource
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.