Files
codeql/java/ql/lib/semmle/code/java/security/SecurityTests.qll
Andrew Eisenberg 8e750f18ad Packaging: Java refactoring
Split java pack into `codeql/java-all` and `codeql/java-queries`.
2021-08-19 14:09:35 -07:00

15 lines
542 B
Plaintext

/** Test detection for the security pack. */
import java
/** A test class that is not a Semmle class or a Juliet test suite class. */
class NonSecurityTestClass extends TestClass {
NonSecurityTestClass() {
not exists(RefType s | this.getASupertype*().getSourceDeclaration() = s and s.fromSource() |
s.getLocation().getFile().getAbsolutePath().matches("%semmle%") or
s.getLocation().getFile().getAbsolutePath().matches("%ql/java/ql/test/%") or
s.getLocation().getFile().getAbsolutePath().matches("%CWE%")
)
}
}