Skip to content

Commit 3ab19ad

Browse files
committed
JS: Fix UnclearOperatorPrecedence
1 parent da554ed commit 3ab19ad

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

javascript/ql/src/Expressions/UnclearOperatorPrecedence.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ where
2525
// don't flag if the other operand is itself a comparison,
2626
// since the nesting tends to be visually more obvious in such cases
2727
not other instanceof Comparison and
28+
// don't flag if the comparison is wrapped in parentheses
29+
not rel.isParenthesized() and
2830
// don't flag occurrences in minified code
2931
not rel.getTopLevel().isMinified()
3032
select rel,

0 commit comments

Comments
 (0)