-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
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
tools: disallow extra blank lines at end of files #8920
Conversation
In preparation for a lint rule that disallows empty lines at the end of a file, remove such lines from a number of test files. Refs: nodejs#8918
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.
LGTM
LGTM, CI failures are due to flaky tests/CI infrastructure issues. |
@@ -80,7 +80,7 @@ rules: | |||
max-len: [2, 80, 2] | |||
new-parens: 2 | |||
no-mixed-spaces-and-tabs: 2 | |||
no-multiple-empty-lines: [2, {max: 2}] | |||
no-multiple-empty-lines: [2, {max: 2, maxEOF: 0}] |
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 about also adding maxBOF: 0
or is it better to do this in another pr?
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 about also adding maxBOF: 0 or is it better to do this in another pr?
Sure, done, rebased, force-pushed.
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.
LGTM
Do we check that files end in |
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.
Yes please. Arguably this is a bug of sorts in git, but alas.
That being said, this doesn't just happen on JS files.
Updated to include |
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.
LGTM
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.
LGTM
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.
LGTM
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.
LGTM
In preparation for a lint rule that disallows empty lines at the end of a file, remove such lines from a number of test files. Refs: nodejs#8918 PR-URL: nodejs#8920 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Enabling linting to disallow extra blank lines at the start or end of JavaScript files in our code base. Fixes: nodejs#8918 PR-URL: nodejs#8920 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
In preparation for a lint rule that disallows empty lines at the end of a file, remove such lines from a number of test files. Refs: #8918 PR-URL: #8920 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Enabling linting to disallow extra blank lines at the start or end of JavaScript files in our code base. Fixes: #8918 PR-URL: #8920 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
In preparation for a lint rule that disallows empty lines at the end of a file, remove such lines from a number of test files. Refs: #8918 PR-URL: #8920 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Enabling linting to disallow extra blank lines at the start or end of JavaScript files in our code base. Fixes: #8918 PR-URL: #8920 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
tools test
Description of change
Fixes: #8918