-
Notifications
You must be signed in to change notification settings - Fork 166
Implement eol_at_end_of_file rule #2762
Conversation
6a19857 to
ad4b32c
Compare
bwilkerson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of extending this to also check that there aren't multiple eol markers in a file?
I can see the benefit in terms of cleanliness. The only downside I can see is that it might trigger when the user adds a couple of blank lines at the end of the file just before typing a new declaration. I suspect those false positives would be acceptable and rare because most people will type the "\n\nclass" fast enough that the linter wouldn't even run when the file's in a bad state.
bwilkerson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution, and thanks for your patience with the review comments. We appreciate both.
pq
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic. Thank you!
|
See also: dart-lang/sdk#58450. |
This PR introduces a new
eol_at_end_of_filerule.Fixes dart-lang/sdk#58445