◐ Shell
clean mode source ↗

Fix blank lines in file-contents-sorter plugin by RoelAdriaans · Pull Request #944 · pre-commit/pre-commit-hooks

As stated in the documentation: `Note that this hook WILL remove blank lines`
Previously this hook would always add blank a blank line.

With this fix, if the file is empty, a newline will not be added, and multpline blanklines in a file will be removed.

Fixes #935

asottile

approved these changes Aug 5, 2023

@pre-commit pre-commit locked as resolved and limited conversation to collaborators

Aug 5, 2023