KEMBAR78
Autofix SA1518: No extra blank lines at the end of the file by xtqqczze · Pull Request #13574 · PowerShell/PowerShell · GitHub
Skip to content

Conversation

@xtqqczze
Copy link
Contributor

@xtqqczze xtqqczze commented Sep 4, 2020

PR Summary

Autofix SA1518: The code must not contain blank lines at the end of the file.

https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1518.md

PR Context

PR Checklist


This change is Reviewable

@iSazonov iSazonov added CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log size/XL Review - Maintainer The PR/issue needs a review from the PowerShell repo Maintainers labels Sep 4, 2020
@ghost
Copy link

ghost commented Sep 12, 2020

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@ghost ghost added the Review - Needed The PR is being reviewed label Sep 12, 2020
@daxian-dbw
Copy link
Member

@PowerShell/powershell-maintainers reviewed this PR and agreed to reject it. We have been telling contributors to add a new line at the end for quite some time, because GitHub code difference usually complains about not having a new line at the end.

@daxian-dbw daxian-dbw closed this Sep 15, 2020
@ghost ghost removed the Review - Needed The PR is being reviewed label Sep 15, 2020
@daxian-dbw daxian-dbw removed the Review - Maintainer The PR/issue needs a review from the PowerShell repo Maintainers label Sep 15, 2020
@xtqqczze
Copy link
Contributor Author

xtqqczze commented Sep 16, 2020

@daxian-dbw According to the documentation for SA1518, the default setting for this rule is: "Files are allowed to end with a single newline character, but it is not required".

To be clear, while this PR removes the necessary blank lines at the the of files, it does not remove the single newline charactor at the end of the last line (which may in fact cause issues with diff tools).

@iSazonov
Copy link
Collaborator

iSazonov commented Sep 16, 2020

@daxian-dbw The PR removes extra second empty line at EOF.

@xtqqczze
Copy link
Contributor Author

@iSazonov Please reopen.

@iSazonov iSazonov reopened this Oct 13, 2020
@iSazonov iSazonov added this to the 7.2.0-preview.1 milestone Oct 13, 2020
@ghost ghost added the Review - Needed The PR is being reviewed label Oct 20, 2020
@ghost
Copy link

ghost commented Oct 20, 2020

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@xtqqczze
Copy link
Contributor Author

@daxian-dbw The PR remove extra second empty line at EOF.

@daxian-dbw Can you please re-review, I would like this merged early for 7.2.0-preview.1.

@ghost ghost removed the Review - Needed The PR is being reviewed label Oct 21, 2020
@ghost ghost added the Review - Needed The PR is being reviewed label Oct 28, 2020
@ghost
Copy link

ghost commented Oct 28, 2020

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

Copy link
Member

@TravisEz13 TravisEz13 left a comment

Choose a reason for hiding this comment

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

Reviewed 57 files

@TravisEz13
Copy link
Member

@PoshChan Please remind me in 7 days

@ghost ghost removed the Review - Needed The PR is being reviewed label Oct 28, 2020
@ghost ghost added the Review - Needed The PR is being reviewed label Nov 5, 2020
@ghost
Copy link

ghost commented Nov 5, 2020

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@iSazonov
Copy link
Collaborator

iSazonov commented Nov 5, 2020

@TravisEz13 Please continue your review.

@ghost ghost removed the Review - Needed The PR is being reviewed label Nov 5, 2020
@iSazonov iSazonov merged commit 4d2965a into PowerShell:master Nov 11, 2020
@iSazonov iSazonov changed the title Autofix SA1518: No blank lines at the end of the file Autofix SA1518: No extra blank lines at the end of the file Nov 11, 2020
@xtqqczze xtqqczze deleted the SA1518 branch November 11, 2020 17:39
@ghost
Copy link

ghost commented Nov 17, 2020

🎉v7.2.0-preview.1 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants