Skip to content

Commit

Permalink
Add reproducer for #6836 (#6842)
Browse files Browse the repository at this point in the history
  • Loading branch information
mary-georgiou-sonarsource committed Mar 2, 2023
1 parent 9715c02 commit 4903462
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ public class DeclareTypesInNamespacesTest

[TestMethod]
public void DeclareTypesInNamespaces_CS_AfterCSharp9() =>
builder.AddPaths("DeclareTypesInNamespaces.AfterCSharp9.cs").WithTopLevelStatements().Verify();
builder
.AddPaths("DeclareTypesInNamespaces.AfterCSharp9.cs", "DeclareTypesInNamespaces.AfterCSharp9.PartialProgramClass.cs")
.WithTopLevelStatements()
.Verify();

[TestMethod]
public void DeclareTypesInNamespaces_CS_AfterCSharp10() =>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// reproducer for https://github.com/SonarSource/sonar-dotnet/issues/6836
public partial class Program { } // Noncompliant, FP this is partial class for the class Program generated by the compiler when using top-level statements

0 comments on commit 4903462

Please sign in to comment.