Skip to content

Formatter / Linter integration #7232

Closed
Closed

Description

@MichaReiser

This depends on the CLI design, e.g. should ruff check or ruff fix run the linter, and if so, how do you opt-in/opt-out?

  • Do we want to run the linter and the formatter at the same time? Is the formatter a normal rule code like isort or entirely separate?
  • Should activating the formatter deactivate certain lint rules?
  • How do we structure fix/format passes?
  • When/where do we warn about invalid suppression comment (Warn about incorrect formatter suppression comments #6611)
  • How to configure the formatter

Activity

  1. added this to the Formatter: Beta milestone on Sep 8, 2023
  2. changed the title [-]linter/formatter interaction[/-] [+]Formatter / Linter integration[/+] on Sep 8, 2023
  3. added
    configuration
    cli
    formatter
    on Sep 8, 2023
  4. self-assigned this
    on Sep 8, 2023
  5. JonathanPlasse commented on Sep 12, 2023

    @JonathanPlasse
    Contributor

    I would like Ruff to fix all errors before formatting the code.
    The formatting at the end could be enabled/disabled via configuration in a dedicated setting like ruff.format.run_after_fix.
    This workflow would be similar to my current use of pre-commit where I run Ruff then Black.

  6. MichaReiser commented on Sep 15, 2023

    @MichaReiser
    MemberAuthor

    @JonathanPlasse we very much would like that too. But we intentionally exclude integrating the formatter into our fix infrastructure for now not to explode scope. We hope to play around with integrating our formatter once it is stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

cliconfigurationformatter

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions