-
Notifications
You must be signed in to change notification settings - Fork 509
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
FileHeaderCodeFixProvider should provide same file header fix as in Stylecop classic with R# #2086
Comments
👍 Might be good to also add a new diagnostic (FileHeaderMustHaveDecoration). |
It is my current understanding StyleCop Classic didn't contain any code which checked for the presence or absence of these lines, but they are simply ignored during analysis. In addition, StyleCop Classic did not implement code fixes, so the discrepancy here is that we match StyleCop Classic behavior without deviation, but are not currently matching ReSharper's behavior. Is this a correct representation? |
Yes, that's true. Those lines where only in the Resharper fix. Btw, also the classic stylecop's code has those decorations, and also the code on http://referencesource.microsoft.com/. So I think there might be more people interested in the fix. About the diagnostic: It might be a nice-to-have feature. But probably makes the code there even more complex. |
For me, this "decoration" is just a decoration, so useless. What is the reason to have such decoration? |
The idea is that the header looks the same as it did with stylecop. |
@lukas-ais If you look at the pull request for this issue you will see that it will be only added if explicitly turned on. |
The current fix result looks like this:
StyleCop classic fix also added some "decoration" lines like this:
I'd like to have that decoration lines back as our whole code base has this header style.
One proposal would be to have there an additional setting in stylecop.json, e.g. like this:
I have already tested it, I'll attach the pull request (no test written yet).
The text was updated successfully, but these errors were encountered: