-
Notifications
You must be signed in to change notification settings - Fork 1.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
SA1518 - The line endings at the end of a file do not match the setti… #7571
Conversation
…ngs for the project.
…ngs for the project.
} |
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.
SA 1518 even applies to newlines at the end of files? I'm not (personally) opposed to taking those out, but I imagine they'd come back in with various editors so probably not worth worrying about. Removing multiple blank lines at the end of a file seems more clear-cut to me.
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.
The analyser uses the editor config settings for new lines. So I don't think they will get overridden by the editor later unless the settings change.
This only affects the |
The analyser has been applied to the whole solution. |
No, only C# files have been touched. |
This issue is specific to the stylecop analyser. I ran the specific analyser fix all for the solution. It only works against .net code and not anything else. Its not a solution wide analyser for all files. |
That clears it up. I have a PR that touches the XAML, Props and Targets files. I was looking to see if I should rebase on top of yours but yours doesn't touch those files. So, no need. |
can you link it here? Are you using an Analyser so they don't sneak back in? |
#7168 and no, I don't think there's an analyzer for these files. |
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. Is the reason we can't enable the rule the Roslyn source package again?
It is not desirable for Microsoft.CodeAnalysis.Collections to omit the trailing newline, so feel free to send a Roslyn PR to just fix those two cases. |
Thanks everyone! |
Rolsyn files have been fixed. Awaiting a release and msbuild to update before we enable the rule. |
Relates to #7174
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1518.md
The two remaining warnings/suggestions are from
RoslynImmutableInterlocked
pulled in fromMicrosoft.CodeAnalysis.Collections
inMicrosoft.Build.Framework
.Solution for the warnings from the nuget package is outlined in dotnet/roslyn#55992