fb-contrib icon indicating copy to clipboard operation
fb-contrib copied to clipboard

SEO_SUBOPTIMAL_EXPRESSION_ORDER false-negative

Open boris-petrov opened this issue 7 years ago • 1 comments

I have something like:

boolean condition = someComplexExpression();

if (someOtherComplexExpression(1, 2) || condition) {
}

But it doesn't trigger the SEO_SUBOPTIMAL_EXPRESSION_ORDER warning. If you can't reproduce it with a simple example, I'l try to work out a working reproduction.

boris-petrov avatar Mar 11 '18 18:03 boris-petrov

the problem with or's is that the individual branches have different targets which makes it hard to figure out whether the two are part of the same if condition or not.

mebigfatguy avatar Apr 03 '18 03:04 mebigfatguy