-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Set up-to-date .NET code quality analyzers #30921
Changes from 10 commits
8f6e5c4
c57ace0
cd9b592
13d7c6a
f5a7716
5b63d72
0a8ec4d
fced254
fa3c95c
68f2170
68f4fa5
7ece8ec
d92ea91
68e400d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Higher global_level has higher priority, the default global_level | ||
# is 100 for root .globalconfig and 0 for others | ||
# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/configuration-files#precedence | ||
is_global = true | ||
global_level = 101 | ||
|
||
dotnet_diagnostic.CA2007.severity = none |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -198,7 +198,7 @@ public void TestKickButtonOnlyPresentWhenHost() | |
|
||
AddStep("make second user host", () => MultiplayerClient.TransferHost(3)); | ||
|
||
AddUntilStep("kick buttons not visible", () => this.ChildrenOfType<ParticipantPanel.KickButton>().Count(d => d.IsPresent) == 0); | ||
AddUntilStep("kick buttons not visible", () => !this.ChildrenOfType<ParticipantPanel.KickButton>().Any(d => d.IsPresent)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I find this debatable. This is test code, so performance isn't a matter, and There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The story about
Do you mean predicate-less To be straight, performance-wise, I'm very sure that the performance is not important here. The question is whether to prefer There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'd say it's situational, at least for test code. At the end of the day it's up to the reviewers to be able to understand the code and feel whether it's maintainable or not. For operational code, I think we can do manual review to keep things simple. Personally, whenever I see There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Meets my expectation to keep things as-is and review in future. |
||
|
||
AddStep("make local user host again", () => MultiplayerClient.TransferHost(API.LocalUser.Value.Id)); | ||
|
||
|
This file was deleted.
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 LINQ analyzers were major changes comparing to framework side PR. The flagged use cases are much more than framework side, and the performance impact should be lower, so I prefer to not turn on warnings. Instead, suggestions will still be visible in IDE.