Prevent class-could-be-static alerts regarding JUnit Nested tests

This commit is contained in:
Chris Smowton
2021-07-26 09:35:26 +01:00
parent 0e9d36b922
commit aca905fa36

View File

@@ -127,7 +127,9 @@ predicate potentiallyStatic(InnerClass c) {
forall(InnerClass superOfNested | superOfNested = nested.getASourceSupertype+() |
potentiallyStatic(superOfNested)
)
)
) and
// JUnit Nested test classes are required to be non-static.
not c.hasAnnotation("org.junit.jupiter.api", "Nested")
}
/**