-
Notifications
You must be signed in to change notification settings - Fork 231
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
Rule S1144: remove duplicate issues in top level statements #5081
Conversation
3095c43
to
e3f95d8
Compare
7920cbd
to
c729f64
Compare
// We cannot tell for sure, but in this case we prefer to have FNs instead of FPs, considering that there is a low chance to have | ||
// a program class in the global namespace. | ||
symbol.Name == "Program" | ||
&& symbol.ContainingNamespace.IsGlobalNamespace; |
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.
analyzers/src/SonarAnalyzer.CSharp/Rules/UnusedPrivateMember.cs
Outdated
Show resolved
Hide resolved
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, just a comment on IsTopLevelProgram
- the symbols were processed twice, once for the Program symbol and the second time for the types defined in the top level statement file.
c729f64
to
36a11bd
Compare
Kudos, SonarCloud Quality Gate passed! |
Kudos, SonarCloud Quality Gate passed! |
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
The symbols were processed twice, once for the Program symbol and the second time for the types defined in the top-level statement file.