Apply suggestions from code review - doc improvements, simplification

Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
This commit is contained in:
Joe Farebrother
2022-09-01 13:54:15 +01:00
parent 6014a75e0e
commit a6a500ade2
2 changed files with 6 additions and 10 deletions

View File

@@ -8,11 +8,7 @@ import semmle.code.java.security.SecurityTests
/** Holds if `ex` looks like a check that this is a debug build. */
private predicate isDebugCheck(Expr ex) {
exists(Expr subex, string debug |
(
debug.toLowerCase().matches("%debug%")
or
debug.toLowerCase().matches("%test%")
) and
debug.toLowerCase().matches(["%debug%", "%test%"]) and
subex.getParent*() = ex
|
subex.(VarAccess).getVariable().getName() = debug