mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Exclude .kt files from java/complex-boolean-expression
This commit is contained in:
@@ -92,13 +92,16 @@ class ComparisonOrEquality extends BinaryExpr {
|
||||
|
||||
from Expr e, string pattern, string rewrite
|
||||
where
|
||||
e.(BoolCompare).simplify(pattern, rewrite)
|
||||
or
|
||||
conditionalWithBool(e, pattern, rewrite)
|
||||
or
|
||||
e.(LogNotExpr).getExpr().(ComparisonOrEquality).negate(pattern, rewrite)
|
||||
or
|
||||
e.(LogNotExpr).getExpr() instanceof LogNotExpr and
|
||||
pattern = "!!A" and
|
||||
rewrite = "A"
|
||||
e.getFile().isJavaSourceFile() and
|
||||
(
|
||||
e.(BoolCompare).simplify(pattern, rewrite)
|
||||
or
|
||||
conditionalWithBool(e, pattern, rewrite)
|
||||
or
|
||||
e.(LogNotExpr).getExpr().(ComparisonOrEquality).negate(pattern, rewrite)
|
||||
or
|
||||
e.(LogNotExpr).getExpr() instanceof LogNotExpr and
|
||||
pattern = "!!A" and
|
||||
rewrite = "A"
|
||||
)
|
||||
select e, "Expressions of the form \"" + pattern + "\" can be simplified to \"" + rewrite + "\"."
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
| SimplifyBoolExpr.kt:8:8:8:16 | ... (value equals) ... | Expressions of the form "A == true" can be simplified to "A". |
|
||||
|
||||
Reference in New Issue
Block a user