Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Usage

Basic Usage

# Scan current directory
antislop

# Scan specific paths
antislop src/ tests/

# Scan single file
antislop examples/sloppy.py

Output Formats

# Human-readable (default)
antislop src/

# JSON output
antislop --json src/

# SARIF for GitHub Security
antislop --format sarif > results.sarif

Profiles

AntiSlop follows the Unix philosophy: minimal defaults, extensible via profiles.

By default, only Core patterns (stubs, critical placeholders) are enabled. For most projects, we recommend the antislop-standard profile.

# Recommended baseline (Standard profile)
antislop --profile antislop-standard src/

# Strict checking (All patterns)
antislop --profile antislop-strict src/

# List available profiles
antislop --list-profiles

Category Control

Fine-tune your scan by enabling/disabling specific pattern categories:

# Disable specific categories
antislop --disable hedging src/
antislop --disable hedging,deferral src/

# Only scan specific categories
antislop --only stub src/
antislop --only stub,placeholder src/

Profile Management

# Load a local profile file
antislop --profile .antislop/profiles/custom.toml src/

# Load a remote profile
antislop --profile https://example.com/profiles/strict.toml src/

Options

OptionDescription
-c, --config <FILE>Path to config file
--profile <NAME>Load a community profile (file, URL, or name)
--list-profilesList available profiles
--disable <CATS>Disable categories (comma-separated)
--only <CATS>Only enable categories (comma-separated)
--hygiene-surveyRun code hygiene survey (detect linters, formatters, CI/CD)
--jsonOutput in JSON format
--format <FMT>Output format: text, json, sarif
-m, --max-size <KB>Maximum file size to scan (default: 1024)
-e, --extensions <EXT>File extensions to scan (comma-separated)
-v, --verboseVerbose output (use -vv, -vvv for more)
--completions <SHELL>Generate shell completions
--list-languagesList supported languages
--print-configPrint default configuration
--no-filename-checkDisable filename convention checking

Hygiene Survey

Run a comprehensive code hygiene survey to discover project setup and tooling:

antislop --hygiene-survey

The survey detects:

  • Project types (Rust, Python, JavaScript, TypeScript, Go, Java, etc.)
  • Linters & Formatters (clippy, rustfmt, ESLint, Prettier, Ruff, etc.)
  • CI/CD Pipelines (GitHub Actions, GitLab CI, Jenkins, CircleCI)
  • Pre-commit hooks (pre-commit, husky, lefthook)

It provides recommendations for missing tools based on your project type.

Examples

JSON Output

antislop --json src/ > results.json

SARIF for GitHub Security

antislop --format sarif > results.sarif

Custom Extensions

antislop -e .py,.rs,.js src/

Verbose Mode

antislop -vv src/

Shell Completions

# For bash
antislop --completions bash > ~/.local/share/bash-completion/completions/antislop

# For zsh
antislop --completions zsh > ~/.zfunc/_antislop

# For fish
antislop --completions fish > ~/.config/fish/completions/antislop.fish

Exit Codes

CodeMeaning
0No slop detected
1Slop found
2Error (config, file access, etc.)

Integration

Pre-commit Hook

Add to .pre-commit-config.yaml:

repos:
  - repo: https://github.com/skew202/antislop
    rev: v0.1.0
    hooks:
      - id: antislop

GitHub Action

- uses: skew202/antislop@v1
  with:
    args: src/