-
Notifications
You must be signed in to change notification settings - Fork 229
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
Add repro for S6678 #9552
Add repro for S6678 #9552
Conversation
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.
More test cases needed
analyzers/tests/SonarAnalyzer.Test/TestCases/UsePascalCaseForNamedPlaceHolders.cs
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.
Had to create to support @$
and $$$
syntax available in C# 8 & C# 11.
Quality Gate passed for 'Sonar .NET Java Plugin'Issues Measures |
Quality Gate passed for 'SonarAnalyzer for .NET'Issues Measures |
{ | ||
logger.LogDebug($@"{nameof(Repro_9545)} filter: {{number}}", number); // Compliant - FN | ||
logger.LogDebug(@$"{nameof(Repro_9545)} filter: {{number}}", number); // Compliant - FN | ||
logger.LogDebug($$"""{{nameof(Repro_9545)}} filter: {number}""", number); // Compliant - FN |
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.
This is a bit surprising. It actually should raise given that implementation looks into interpolated string text portions. Nevermind. It is documented now.
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
Repro for #9545