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

Formatter / Linter integration #7232

Closed
MichaReiser opened this issue Sep 8, 2023 · 2 comments
Closed

Formatter / Linter integration #7232

MichaReiser opened this issue Sep 8, 2023 · 2 comments
Assignees
Labels
cli Related to the command-line interface configuration Related to settings and configuration formatter Related to the formatter

Comments

@MichaReiser
Copy link
Member

MichaReiser commented Sep 8, 2023

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
@MichaReiser MichaReiser added this to the Formatter: Beta milestone Sep 8, 2023
@MichaReiser MichaReiser changed the title linter/formatter interaction Formatter / Linter integration Sep 8, 2023
@MichaReiser MichaReiser added configuration Related to settings and configuration cli Related to the command-line interface formatter Related to the formatter labels Sep 8, 2023
@MichaReiser MichaReiser self-assigned this Sep 8, 2023
@JonathanPlasse
Copy link
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.

@MichaReiser
Copy link
Member Author

MichaReiser commented Sep 15, 2023

@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
Labels
cli Related to the command-line interface configuration Related to settings and configuration formatter Related to the formatter
Projects
None yet
Development

No branches or pull requests

4 participants