-
Notifications
You must be signed in to change notification settings - Fork 239
New rule T0001: Use FileScoped namespaces #9050
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
Conversation
d390643 to
273f431
Compare
sebastien-marichal
left a comment
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 left a small suggestion
|
|
||
| [TestMethod] | ||
| public void FileScopeNamespace_Compliant() => | ||
| builder.AddPaths("FileScopeNamespace.Compliant.cs").Verify(); |
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.
For this kind of test, I believe it is better to be explicit that there are no issues at all:
| builder.AddPaths("FileScopeNamespace.Compliant.cs").Verify(); | |
| builder.AddPaths("FileScopeNamespace.Compliant.cs").VerifyNoIssueReported(); |
In my opinion, Verify should fail if there is no issue reported.
sebastien-marichal
left a comment
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!
|
|




Fixes #9035
This is based on #9048 and #9049. These commits do not need review:Simplify registration extensionsCreate SonarAnalyzer.CSharp.Styling projectUpdate locks