astral-sh/ruff

How to use COM812 in linter but avoid conflict with formatter?

Open

#9.216 geöffnet am 20. Dez. 2023

Auf GitHub ansehen
 (42 Kommentare) (32 Reaktionen) (0 zugewiesene Personen)Rust (2.088 Forks)batch import
documentationformatterhelp wantedincompatibility

Repository-Metriken

Stars
 (47.527 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 3T 8h) (573 gemergte PRs in 30 T)

Beschreibung

I would like to achieve the following things:

  • Use the ruff linter on my code
  • Use the ruff formatter on my code
  • Enable rule COM812 for the linter

I like the linter, I like the formatter, and I like rule COM812. However, when I have COM812 as an allowed rule I get a warning when I run the formatter that rule COM812 may cause conflicts and that it should be disabled to avoid unexpected behavior. Is there, then, a recommended way to achieve my three goals?

I see a number of issues discussing rule COM812 but I don't see any addressing this exact question.

Contributor Guide