Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document rules potentially conflicting with the formatter #7647

Closed
Tracked by #7642
MichaReiser opened this issue Sep 25, 2023 · 3 comments · Fixed by #7732
Closed
Tracked by #7642

Document rules potentially conflicting with the formatter #7647

MichaReiser opened this issue Sep 25, 2023 · 3 comments · Fixed by #7732
Assignees
Labels
documentation Improvements or additions to documentation formatter Related to the formatter

Comments

@MichaReiser
Copy link
Member

Update the documentation of lint-rules that potentially conflict with the formatter and mention that we discourage using them in combination with the formatter.

@MichaReiser MichaReiser added documentation Improvements or additions to documentation formatter Related to the formatter labels Sep 25, 2023
@MichaReiser MichaReiser added this to the Formatter: Beta milestone Sep 25, 2023
@ngnpope
Copy link
Contributor

ngnpope commented Sep 26, 2023

One to add to this list is C812 which wants trailing commas everywhere and is thus semi-incompatible with black's handling of formatting based on the presence or absence of trailing commas.

@charliermarsh
Copy link
Member

(I think that should be COM812 in Ruff parlance.)

@ngnpope
Copy link
Contributor

ngnpope commented Sep 26, 2023

Yes, my mistake!

@charliermarsh charliermarsh self-assigned this Oct 1, 2023
charliermarsh added a commit that referenced this issue Oct 20, 2023
## 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 #7235.

Closes #7647.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation formatter Related to the formatter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants