From 36b6cc3d3fa5a8865650db334890e137b779c257 Mon Sep 17 00:00:00 2001 From: Tim Pohlmann Date: Fri, 3 May 2024 16:01:48 +0200 Subject: [PATCH] Repro for #9241 --- .../SonarAnalyzer.Test/TestCases/ClassShouldNotBeEmpty.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/analyzers/tests/SonarAnalyzer.Test/TestCases/ClassShouldNotBeEmpty.cs b/analyzers/tests/SonarAnalyzer.Test/TestCases/ClassShouldNotBeEmpty.cs index 8fead26a471..0e677e5e239 100644 --- a/analyzers/tests/SonarAnalyzer.Test/TestCases/ClassShouldNotBeEmpty.cs +++ b/analyzers/tests/SonarAnalyzer.Test/TestCases/ClassShouldNotBeEmpty.cs @@ -121,7 +121,7 @@ class AttributeError { } interface IMarker { } // Compliant - this rule only deals with classes - class ImplementsMarker : IMarker { } // Compliant - implements a marker interface + class ImplementsMarker : IMarker { } // Compliant - implements a marker interface struct EmptyStruct { } // Compliant - this rule only deals with classes @@ -131,6 +131,7 @@ class SomeCommand { } // Compliant, ignored because of th class SomeEvent { } // Compliant, ignored because of the suffix class SomeMessage { } // Compliant, ignored because of the suffix class Some_Command { } // Compliant, ignored because of the suffix + class SomeQuery { } // Noncompliant FP, should be ignored because of the suffix, Repro for https://github.com/SonarSource/sonar-dotnet/issues/9241 class Someevent { } // Noncompliant class SOMEMESSAGE { } // Noncompliant class SomeCommandHandler { } // Noncompliant @@ -138,6 +139,8 @@ class MessageHandler { } // Noncompliant class Command { } // Compliant, ignored because of the suffix class Event { } // Compliant, ignored because of the suffix class Message { } // Compliant, ignored because of the suffix + class Query { } // Noncompliant FP, should be ignored because of the suffix + class AssemblyDoc { } // Compliant, used for DefaultDocumentation tool class NamespaceDoc { } // compliant, used for DefaultDocumentation tool