Skip to content

Fix blank lines in file-contents-sorter plugin - #944

Merged
asottile merged 1 commit into
pre-commit:mainfrom
RoelAdriaans:file-content-sorted-blank-line-fix
Aug 5, 2023
Merged

Fix blank lines in file-contents-sorter plugin#944
asottile merged 1 commit into
pre-commit:mainfrom
RoelAdriaans:file-content-sorted-blank-line-fix

Conversation

@RoelAdriaans

Copy link
Copy Markdown
Contributor

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 multiple blank lines in a file will be removed.

Fixes #935

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 asottile left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asottile
asottile merged commit 61b5f7e into pre-commit:main Aug 5, 2023
@szepeviktor

This comment was marked as off-topic.

@pre-commit pre-commit locked as resolved and limited conversation to collaborators Aug 5, 2023
@RoelAdriaans
RoelAdriaans deleted the file-content-sorted-blank-line-fix branch August 5, 2023 21:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants