Skip to content

Conversation

@pavel-mikula-sonarsource
Copy link
Contributor

@pavel-mikula-sonarsource pavel-mikula-sonarsource commented Apr 9, 2024

Fixes #9035

This is based on #9048 and #9049. These commits do not need review:

  • Simplify registration extensions
  • Create SonarAnalyzer.CSharp.Styling project
  • Update locks

Copy link
Contributor

@sebastien-marichal sebastien-marichal left a 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();
Copy link
Contributor

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:

Suggested change
builder.AddPaths("FileScopeNamespace.Compliant.cs").Verify();
builder.AddPaths("FileScopeNamespace.Compliant.cs").VerifyNoIssueReported();

In my opinion, Verify should fail if there is no issue reported.

@pavel-mikula-sonarsource pavel-mikula-sonarsource marked this pull request as ready for review April 9, 2024 12:39
Copy link
Contributor

@sebastien-marichal sebastien-marichal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sebastien-marichal sebastien-marichal enabled auto-merge (squash) April 9, 2024 12:41
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 9, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 9, 2024

@sebastien-marichal sebastien-marichal merged commit 752f59c into master Apr 9, 2024
@sebastien-marichal sebastien-marichal deleted the Pavel/T0001 branch April 9, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New Rule T0001: Use FileScoped namespaces

2 participants