Closed huxuan closed 7 months ago
Good question! It shouldn't be necessary since pre-commit will already exit with failure if a hook modifies files -- so if files need to be formatted, pre-commit will fail (as expected), but the files will be formatted, which is typically desirable. (You can run with --check
, but the files won't be formatted, so ultimately up to you as to what you prefer.)
According to the exit codes, without
--check
, the exit code ofruff format
will beSo, I assume to have the pre-commit run as expected, we should add
--check
flag, right?