Java: remove redundant 'non-static' wording and update qhelp

This commit is contained in:
Jami Cogswell
2025-03-21 22:43:35 -04:00
parent 640096c822
commit 3e13f0ed41
9 changed files with 57 additions and 82 deletions

View File

@@ -30,7 +30,7 @@ public class AnnotationTest {
}
}
public static class Test5 { // COMPLIANT: Static inner test classes don't need `@Nested`
public static class Test5 { // COMPLIANT: Static nested test classes don't need `@Nested`
@Test
public void test() {
}
@@ -45,7 +45,7 @@ public class AnnotationTest {
}
}
public abstract class Test7 { // COMPLIANT: Abstract inner test classes don't need `@Nested`
public abstract class Test7 { // COMPLIANT: Abstract nested test classes don't need `@Nested`
@Test
public void test() {
}

View File

@@ -0,0 +1 @@
| AnnotationTest.java:13:16:13:20 | Test2 | This JUnit 5 inner test class lacks a '@Nested' annotation. |

View File

@@ -0,0 +1,2 @@
query: Likely Bugs/Frameworks/JUnit/JUnit5MissingNestedAnnotation.ql
postprocess: utils/test/InlineExpectationsTestQuery.ql

View File

@@ -1 +0,0 @@
| AnnotationTest.java:13:16:13:20 | Test2 | This JUnit5 inner test class lacks a '@Nested' annotation. |

View File

@@ -1,2 +0,0 @@
query: Likely Bugs/Frameworks/JUnit/JUnit5NonStaticInnerClassMissingNestedAnnotation.ql
postprocess: utils/test/InlineExpectationsTestQuery.ql