Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5d3e8d2 + aca905f commit 6c666b4Copy full SHA for 6c666b4
1 file changed
java/ql/src/Performance/InnerClassCouldBeStatic.ql
@@ -127,7 +127,9 @@ predicate potentiallyStatic(InnerClass c) {
127
forall(InnerClass superOfNested | superOfNested = nested.getASourceSupertype+() |
128
potentiallyStatic(superOfNested)
129
)
130
- )
+ ) and
131
+ // JUnit Nested test classes are required to be non-static.
132
+ not c.hasAnnotation("org.junit.jupiter.api", "Nested")
133
}
134
135
/**
0 commit comments