-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Suppressing one IDExxxx rule from a multi-rule EditorConfig setting is not possible if EnforceCodeStyleInBuild is enabled #73858
Comments
This behavior is by design. We are working (#73843) to add an option where the I would recommend filing a bug report specifically for the |
@cremor Thank you very much for taking the time to file this issue with the full detail. It would have taken me a very long time to otherwise unravel this slightly different situation from the others that have been reported recently. I'm going to keep it in its current form so we can continue to point to it in the future as the reason why code style settings should in general apply to only one diagnostic. The new issue would focus on |
@sharwell I'm not sure if I understand you correctly. Build time analysis - which was only enabled for the But are you saying that the current behavior of the IntelliSense analysis is by design too? Should the property |
@cremor I don't think I understand the question. I was reviewing this issue for the limited case where EnforceCodeStyleInBuild is set to true (step 4 in the initial post). Is there a separate question you have for a scenario where it is set to false? |
No, my question is about when it is set to true. But I'm observing the IntelliSense analysis results in the Visual Studio error list. I'm not concerned about build time analysis output (right now). |
@sharwell (Again using a mention, not sure if you saw my last message.) I have an additional question. What did you mean with this?
Did you only mean that in the context of build time analysis, or for IntelliSense analysis too? |
My answer above was related to what happens on build when The
I'm not aware of a case where it would make a difference here. |
@sharwell The description is this issue. If I understand you correctly then scenario A is step 3 and scenario B is step 5 of my first post here. |
@sharwell -- Can this be assigned to you for further follow up? |
Going to go ahead and assign to Sam |
Since this was reopened, could someone please remove the "Resolution-By Design" label? |
@cremor I am not able to reproduce this issue with the 8.0.300 SDK. After both step 3 and step 5, only IDE0300 is displayed. I believe this issue may have been resolved in a newer version than 17.10.1 (I'm on Version 17.11.0 Preview 3.0 [35012.247.main]). |
@sharwell I can still reproduce the problem in VS 17.10.3 (SDK 8.0.302). But then I've tested 17.11.0 Preview 2.1 and it indeed seems to be fixed in that version. Thanks! But I noticed another difference that I'd like to discuss (unrelated to the original issue): |
It's not desired, but it's a situation we know happens. We are working on a solution in dotnet/sdk#41791. |
Closed as Not Repro |
Version Used: VS 17.10.1, SDK 8.0.300
Steps to Reproduce:
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
to the csproj file.Diagnostic Id:
"IDE0305: Use collection expression for fluent"
Expected Behavior:
Only the IDE0300 warning for the first line is shown.
Actual Behavior:
The IDE0305 warning is shown for the second line.
Additional information:
The second warning shows up without building the project. So the setting
EnforceCodeStyleInBuild
seems to have some effect even without building.Similar to #72094 (fixed by #72238), but only when
EnforceCodeStyleInBuild
is enabled.Related to #52991 (comment)
FYI @mavasani and @sharwell
The text was updated successfully, but these errors were encountered: