✂️ Clipped
Clipped is a workspace-aware, file-scoped cargo clippy wrapper that filters diagnostics.
✨ Features
- 📁 File-based filtering: See only diagnostics for files you specify
- 🚀 Workspace-aware: Automatically runs only on relevant workspace packages
- 🎯 Level filtering: Control diagnostic severity (note, help, warning, error)
- ⚙️ Flexible configuration: CLI, env vars, or config file
- 🔧 Clippy pass-through: Forward any arguments to Clippy
📦 Installation
🛠 Usage
# Run on entire project (same as `cargo clippy`)
# Run on specific files
# Show only errors
# Pass args to Clippy
⚙️ Configuration
Configure via .clipped.toml:
= "error"
= ["-W", "clippy::pedantic"]
Or set environment variables:
# as JSON array
🤖 CLI
Options
--config <CONFIG_PATH>- Path to the config file (default:.clipped.toml)--level <LEVEL>- Set the level:note,help,warning,error(default:warning)-v,--verbose- Enable verbose output-h,--help- Print help-V,--version- Print version
🪝 Git Hooks
Clipped is designed to integrate seamlessly with Git hooks.
With pre-commit:
repos:
- repo: local
hooks:
- id: clipped
name: clipped
entry: clipped
language: system
args:
pass_filenames: true
require_serial: true
or use the clipped repository:
repos:
- repo: https://github.com/tankosinn/clipped
rev: 0.1.0
hooks:
- id: clipped