Ruff Professional Development
Version: 0.14.10 (Documentation generated December 2025)
Overview
Ruff is an extremely fast Python linter and formatter written in Rust. It combines the functionality of multiple Python tools (Flake8, isort, Black, pyupgrade, and more) into a single high-performance tool.
This skill provides comprehensive guidance for:
- Configuring and integrating Ruff into Python projects
- Understanding and fixing lint rule violations
- Formatting Python code with Ruff's formatter
- Setting up editor integrations
- Migrating from other Python tooling
Quick Start
Installation
See
references/installation.md
for complete installation instructions across all platforms and package managers.
Basic Usage
Linting:
bash
ruff check . # Lint all files
ruff check path/to/file.py # Lint specific file
ruff check --fix . # Auto-fix violations
Formatting:
bash
ruff format . # Format all files
ruff format path/to/file.py # Format specific file
ruff format --check . # Check formatting without changes
Configuration:
toml
# pyproject.toml or ruff.toml
[tool.ruff]
line-length = 88
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I"]
ignore = ["E501"]
See
references/configuration.md
for comprehensive configuration options.
Core Workflows
1. Integrating Ruff into a Project
Steps:
- Install Ruff (see
references/installation.md
)
- Create initial configuration (see
references/configuration.md
)
- Run initial check:
- Review and configure rules (see )
- Set up pre-commit hooks or CI integration (see
references/integrations.md
)
2. Fixing Lint Violations
Process:
- Run to identify violations
- For specific rule violations, reference
references/rules/<rule-name>.md
- Apply automatic fixes:
- Manual fixes for remaining violations using rule documentation
Finding Rule Documentation:
- All 937 rules are in
- Rules are named by their description (e.g., , )
- See
references/rules/rules.md
for complete rule index
3. Code Formatting
Workflow:
- Review formatter overview:
references/formatter/overview.md
- Configure formatter settings in
- Run formatter:
- For Black compatibility: see
references/formatter/black.md
4. Editor Integration
Setup:
- Review
references/editors/overview.md
for editor support
- Follow setup instructions:
references/editors/setup.md
- Configure editor settings:
references/editors/settings.md
- Explore editor features:
references/editors/features.md
5. Migrating from Other Tools
Migration paths:
- From Black: See
references/formatter/black.md
- From Flake8/isort/pyupgrade: See
references/configuration.md
for rule equivalents
- General migration: See for migration guidance
Documentation Organization
This skill includes comprehensive reference documentation organized for efficient access:
Navigation Guide: - Complete index of all documentation with use-case based navigation
Core Documentation:
- - Complete configuration reference
- - All available settings and options
- - Linter functionality and configuration
- - Comprehensive getting started guide
Formatter:
- - Formatter basics
- - Black compatibility
Rules (937 total):
- - Rules overview and index
- - Individual rule documentation
Editor Integration:
- - Editor support overview
- - Installation instructions
- - Available features
- - Configuration options
Other Resources:
- - Installation guide
- - CI/CD and tool integrations
- - Versioning and compatibility
- - Preview features
- - Frequently asked questions
- - Contributing to Ruff
Finding Specific Information
For configuration questions:
- Start with for all available options
- Review
references/configuration.md
for configuration patterns
- Check or
references/formatter/overview.md
for component-specific settings
For rule violations:
- Note the rule code/name from error message
- Find corresponding file in
- Rules are alphabetically named (e.g., E501 → )
For editor setup:
- Check
references/editors/overview.md
for supported editors
- Follow
references/editors/setup.md
for your editor
- Configure with
references/editors/settings.md
For tool migration:
- Review for general guidance
- See
references/formatter/black.md
for Black-specific migration
- Check
references/configuration.md
for rule mapping from other linters
Included Scripts
This skill includes Python scripts for updating documentation (located in
):
- scrape_ruff_docs.py - Scrape a single Ruff documentation page
- discover_ruff_docs.py - Discover all Ruff documentation URLs
- bulk_scrape_ruff.py - Bulk scrape all Ruff documentation
These scripts use cloudscraper, BeautifulSoup, and markdownify to fetch and convert Ruff documentation.
Best Practices
When configuring Ruff:
- Start with defaults and incrementally add rules
- Use to enable rule categories, for exceptions
- Test configuration changes incrementally
- Document reasoning for ignored rules in comments
When fixing violations:
- Review auto-fixes before committing
- Understand the rule before ignoring it
- Use inline ignores () sparingly
- Consider if the rule should be disabled project-wide
When formatting:
- Run formatter before linter to avoid conflicts
- Configure line length consistently across tools
- Use in CI to verify formatting
- Format entire codebase at once when first adopting
When integrating:
- Set up editor integration for immediate feedback
- Add pre-commit hooks for team consistency
- Include in CI pipeline with appropriate settings
- Document Ruff configuration in project README
Advanced Usage
Performance optimization:
- Use for faster repeated runs
- Configure file exclusions to skip irrelevant paths
- Leverage parallel execution (default behavior)
Preview features:
- See for experimental features
- Enable with in configuration
- Test preview rules before enabling in production
Custom rule selection:
- Combine rule categories:
select = ["E", "F", "I", "N"]
- Use per-file ignores for specific patterns
- Configure different rules for different directories
Documentation Coverage
This skill provides complete coverage of Ruff v0.14.10:
- 937 individual rule documentation files
- Full configuration and settings reference
- Complete editor integration guides
- Formatter documentation including Black compatibility
- Installation, integration, and migration guides
- FAQ and troubleshooting resources
All documentation is current as of December 2025 and reflects the latest stable release (0.14.10).