ruff Plugin
Extremely fast Python linter and formatter, written in Rust.
Commands
Check
ruff check run— Lint Python filesruff check fix— Lint and auto-fix Python files
Format
ruff format run— Format Python filesruff format check— Check formatting without applying
Usage Examples
- "Lint this Python file"
- "Auto-fix all Python issues"
- "Format Python files"
- "Check formatting without changing files"
Installation
pip install ruff
Examples
# Lint
ruff check .
# Lint with auto-fix
ruff check --fix .
# Format
ruff format .
# Check formatting
ruff format --check .
# With config (pyproject.toml)
ruff check --config pyproject.toml .
# Specific rules
ruff check --select I .