-
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
S1144: Add repro for #8342 #8354
Conversation
namespace Tests.Diagnostics | ||
using System; | ||
|
||
namespace Tests.Diagnostics |
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.
I'm surprised you haven't fought your war against block-scoped namespaces for this file 😄
Edit: nevermind, I saw that it namespaces have some actual purpose here
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.
Yes, in this case there are other namespaces, so I could not easily go for it :-)
// https://github.com/SonarSource/sonar-dotnet/issues/8342 | ||
class Repro_8342 | ||
{ | ||
[Private1] public void APublicMethod() => APrivateMethodCalledByAPublicMethod(); |
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.
Maybe it's also worth adding a test case with multiple attributes (and list attributes):
[SomePublicAttribute, Private1]
public void Something() { }
[SomePublicAttribute]
[Private1]
public void Something2() { }
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.
Looks good, please check out my suggestion before merging!
d0e6954
to
36de33b
Compare
Kudos, SonarCloud Quality Gate passed! |
Kudos, SonarCloud Quality Gate passed! |
Reproduces #8342