astral-sh / ruff-pre-commit

A pre-commit hook for Ruff.
Apache License 2.0
802 stars 38 forks source link

Update pre-commit documentation #57

Closed charliermarsh closed 8 months ago

charliermarsh commented 8 months ago

I got some feedback on Mastodon that it wasn't clear how to use the linter and formatter together in pre-commit.

This also removes --exit-non-zero-on-fix, since pre-commit already exits if files are changed, and changes our recommendation to always put the formatter after the linter, since if a previous tool ends up committing changes, pre-commit should fail anyway.