Skip to content

Autofix SA1518: No extra blank lines at the end of the file - #13574

Merged
Ilya (iSazonov) merged 1 commit into
PowerShell:masterfrom
xtqqczze:SA1518
Nov 11, 2020
Merged

Autofix SA1518: No extra blank lines at the end of the file#13574
Ilya (iSazonov) merged 1 commit into
PowerShell:masterfrom
xtqqczze:SA1518

Conversation

@xtqqczze

@xtqqczze xtqqczze commented Sep 4, 2020

Copy link
Copy Markdown
Contributor

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 Ilya (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
Copy Markdown

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
Copy Markdown
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.

@ghost ghost removed the Review - Needed The PR is being reviewed label Sep 15, 2020
@daxian-dbw Dongbo Wang (daxian-dbw) removed the Review - Maintainer The PR/issue needs a review from the PowerShell repo Maintainers label Sep 15, 2020
@xtqqczze

xtqqczze commented Sep 16, 2020

Copy link
Copy Markdown
Contributor Author

Dongbo Wang (@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

Ilya (iSazonov) commented Sep 16, 2020

Copy link
Copy Markdown
Collaborator

Dongbo Wang (@daxian-dbw) The PR removes extra second empty line at EOF.

@xtqqczze

Copy link
Copy Markdown
Contributor Author

Ilya (@iSazonov) Please reopen.

@iSazonov Ilya (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
Copy Markdown

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
Copy Markdown
Contributor Author

Dongbo Wang (@daxian-dbw) The PR remove extra second empty line at EOF.

Dongbo Wang (@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
Copy Markdown

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

@TravisEz13 Travis Plunk (TravisEz13) 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.

Reviewed 57 files

@TravisEz13

Copy link
Copy Markdown
Member

PoshChan-Bot (@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
Copy Markdown

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
Copy Markdown
Collaborator

Travis Plunk (@TravisEz13) Please continue your review.

@ghost ghost removed the Review - Needed The PR is being reviewed label Nov 5, 2020
@iSazonov
Ilya (iSazonov) merged commit 4d2965a into PowerShell:master Nov 11, 2020
@iSazonov Ilya (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
Copy Markdown

🎉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