Skip to content

Commit

Permalink
S3253: add repro for #8092
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioaversa committed Sep 27, 2023
1 parent 3391bfd commit 059ba9c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ public void RedundancyInConstructorDestructorDeclaration_CSharp10() =>
.WithOptions(ParseOptionsHelper.FromCSharp10)
.Verify();

[TestMethod]
public void RedundancyInConstructorDestructorDeclaration_CSharp12() =>
builder.AddPaths("RedundancyInConstructorDestructorDeclaration.CSharp12.cs")
.WithOptions(ParseOptionsHelper.FromCSharp12)
.Verify();

[TestMethod]
public void RedundancyInConstructorDestructorDeclaration_CodeFix_CSharp9() =>
codeFixBuilderRemoveBaseCall.AddPaths("RedundancyInConstructorDestructorDeclaration.CSharp9.cs")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// https://github.com/SonarSource/sonar-dotnet/issues/8092
namespace Repro_8092
{
namespace PrimaryParameterlessConstructor
{
class AClassWithBody() { } // FN
class AClassWithoutBody(); // FN
struct AStructWithBody() { } // FN
struct AStructWithoutBody(); // FN
record ARecordWithBody() { } // FN
record ARecordWithoutBody(); // FN
record struct ARecordStructWithBody() { } // FN
record struct ARecordStructWithoutBody(); // FN
}
}

0 comments on commit 059ba9c

Please sign in to comment.