Skip to content

Support ruff check --fix as a formatter #758

Open
@zmeir

Description

@zmeir

#744 will add support for ruff format as a code-formatter.

Ruff also supports the ruff check --fix in its linter command, that allows it to automatically fix some linter errors. This essentially turns ruff check from a linter to a code-formatter.

It would be nice if we could also use ruff check --fix as a code-formatter with Darker.
There are also additional flags to control the auto-fixing behavior, that maybe need to be taken into account: --fix-only, --unsafe-fixes.

Why not just use Graylint?

Graylint is a perfect solution for running linter commands that do not modify the code.
However, with ruff check --fix, the "linter" will automatically modify the code the fix the linter errors. This means that ruff check --fix is not only a linter but also a code-formatter, and as such is incompatible with Graylint.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions