mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Java: tests to inline expectations
This commit is contained in:
@@ -9,7 +9,8 @@ public class AnnotationTest {
|
||||
}
|
||||
}
|
||||
|
||||
public class Test2 { // NON_COMPLIANT: Inner test class is missing a `@Nested`
|
||||
// NON_COMPLIANT: Inner test class is missing `@Nested`
|
||||
public class Test2 { // $ Alert
|
||||
@Test
|
||||
public void test() {
|
||||
}
|
||||
@@ -35,8 +36,10 @@ public class AnnotationTest {
|
||||
}
|
||||
}
|
||||
|
||||
// COMPLIANT: Invalid to use `@Nested` on a static class, but
|
||||
// this matter is out of scope (see QHelp Implementation Notes)
|
||||
@Nested
|
||||
public static class Test6 { // COMPLIANT: Although invalid, this matter is out of the scope (see Implementation Details)
|
||||
public static class Test6 {
|
||||
@Test
|
||||
public void test() {
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
| AnnotationTest.java:12:16:12:20 | Test2 | This JUnit5 inner test class lacks a @Nested annotation. |
|
||||
| AnnotationTest.java:13:16:13:20 | Test2 | This JUnit5 inner test class lacks a '@Nested' annotation. |
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
Likely Bugs/Frameworks/JUnit/JUnit5NonStaticInnerClassMissingNestedAnnotation.ql
|
||||
query: Likely Bugs/Frameworks/JUnit/JUnit5NonStaticInnerClassMissingNestedAnnotation.ql
|
||||
postprocess: utils/test/InlineExpectationsTestQuery.ql
|
||||
|
||||
Reference in New Issue
Block a user