We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
consistent_trailing_blank_line
Files should end in a single trailing blank line.
This is mostly for historical reasons: every text file should end with a \n, or newline since this acts as eol or the end of the line character.
See also: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
Most text editors ensure this "final newline" automatically.
elvis should warn when such a line is missing or when multiple lines are present.
elvis
Note: this can also be considered a formatter issue, so shouldn't exist in your code base if you're using such an element.
style should be either windows or unix (for \r\n, or \n)
style
windows
unix
Inspired by Credo's Credo.Check.Readability.TrailingBlankLine.
The text was updated successfully, but these errors were encountered:
Don't forget to add an option to specify the expected trailing line style.
Sorry, something went wrong.
You mean like \n or \r\n? (edit: check the description above)
Yeah.
No branches or pull requests
Name
consistent_trailing_blank_line
Brief Description
Files should end in a single trailing blank line.
Reasoning
This is mostly for historical reasons: every text file should end with a \n, or newline since this acts as eol or the end of the line character.
See also: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
Most text editors ensure this "final newline" automatically.
Refactoring Proposal
elvis
should warn when such a line is missing or when multiple lines are present.Note: this can also be considered a formatter issue, so shouldn't exist in your code base if you're using such an element.
Options
style
should be eitherwindows
orunix
(for \r\n, or \n)Origin (#281)
Inspired by Credo's Credo.Check.Readability.TrailingBlankLine.
The text was updated successfully, but these errors were encountered: