mirror of
https://github.com/astral-sh/ruff
synced 2026-01-09 07:34:06 -05:00
## Summary
This PR updates our documentation for the upcoming formatter release.
Broadly, the documentation is now structured as follows:
- Overview
- Tutorial
- Installing Ruff
- The Ruff Linter
- Overview
- `ruff check`
- Rule selection
- Error suppression
- Exit codes
- The Ruff Formatter
- Overview
- `ruff format`
- Philosophy
- Configuration
- Format suppression
- Exit codes
- Black compatibility
- Known deviations
- Configuring Ruff
- pyproject.toml
- File discovery
- Configuration discovery
- CLI
- Shell autocompletion
- Preview
- Rules
- Settings
- Integrations
- `pre-commit`
- VS Code
- LSP
- PyCharm
- GitHub Actions
- FAQ
- Contributing
The major changes include:
- Removing the "Usage" section from the docs, and instead folding that
information into "Integrations" and the new Linter and Formatter
sections.
- Breaking up "Configuration" into "Configuring Ruff" (for generic
configuration), and new Linter- and Formatter-specific sections.
- Updating all example configurations to use `[tool.ruff.lint]` and
`[tool.ruff.format]`.
My suggestion is to pull and build the docs locally, and review by
reading them in the browser rather than trying to parse all the code
changes.
Closes https://github.com/astral-sh/ruff/issues/7235.
Closes https://github.com/astral-sh/ruff/issues/7647.
68 lines
1.7 KiB
YAML
68 lines
1.7 KiB
YAML
site_name: Ruff
|
|
theme:
|
|
name: material
|
|
logo: assets/bolt.svg
|
|
favicon: assets/ruff-favicon.png
|
|
features:
|
|
- navigation.instant
|
|
- navigation.instant.prefetch
|
|
- navigation.tracking
|
|
- content.code.annotate
|
|
- toc.integrate
|
|
- toc.follow
|
|
- navigation.path
|
|
- navigation.top
|
|
- content.code.copy
|
|
palette:
|
|
# Note: Using the system theme works with the insiders version
|
|
# https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#automatic-light-dark-mode
|
|
- media: "(prefers-color-scheme)"
|
|
toggle:
|
|
icon: material/brightness-auto
|
|
name: Switch to light mode
|
|
- media: "(prefers-color-scheme: light)"
|
|
scheme: astral-light
|
|
toggle:
|
|
icon: material/brightness-7
|
|
name: Switch to dark mode
|
|
- media: "(prefers-color-scheme: dark)"
|
|
scheme: astral-dark
|
|
toggle:
|
|
icon: material/brightness-4
|
|
name: Switch to system preference
|
|
custom_dir: docs/.overrides
|
|
repo_url: https://github.com/astral-sh/ruff
|
|
repo_name: ruff
|
|
site_author: charliermarsh
|
|
site_url: https://docs.astral.sh/ruff/
|
|
site_dir: site/ruff
|
|
markdown_extensions:
|
|
- admonition
|
|
- pymdownx.details
|
|
- toc:
|
|
permalink: "#"
|
|
- pymdownx.snippets:
|
|
- pymdownx.magiclink:
|
|
- attr_list:
|
|
- md_in_html:
|
|
- pymdownx.highlight:
|
|
anchor_linenums: true
|
|
- pymdownx.inlinehilite:
|
|
- pymdownx.superfences:
|
|
- markdown.extensions.attr_list:
|
|
- pymdownx.keys:
|
|
- pymdownx.tasklist:
|
|
custom_checkbox: true
|
|
- pymdownx.highlight:
|
|
anchor_linenums: true
|
|
plugins:
|
|
- search
|
|
extra_css:
|
|
- stylesheets/extra.css
|
|
not_in_nav: |
|
|
/rules/*
|
|
/formatter/*
|
|
extra:
|
|
analytics:
|
|
provider: fathom
|