-
Notifications
You must be signed in to change notification settings - Fork 226
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
S2589: Add repros #8014
S2589: Add repros #8014
Conversation
gregory-paidis-sonarsource
commented
Sep 14, 2023
- Repro for S2589 FP: Rule is raised on catch-all tuples in switch expressions #8008
- Repro for S2589 FP: Rule is erroneously raised on var-type pattern matches that use when clauses #8011
{ | ||
return flags switch | ||
{ | ||
var value when value.HasFlag(Flags.Foo) => 1, // Noncompliant FP |
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.
Please assert also the message for these issues.
It will speed up our understanding upon tackling it.
{ | ||
public int? Age { get; set; } | ||
} | ||
// ... |
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.
nitpick: just line break here is enough.
// ... |
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 - some nitpicks
Kudos, SonarCloud Quality Gate passed! |
Kudos, SonarCloud Quality Gate passed! |