Suggestion to soften S1067 "Expressions should not be too complex" by ignoring long but still very simple expressions

This is similar to
and, which both actually have the same “problem”. Both want the rule to be handled differently regarding the context, e.g. the equals() method or instanceof(), but I think they both boil down to this:

We are marking a lot of these as “wontfix” in cases where we have a long chain of && or || only.


if(a || b || c || d || e || f) {
  // do something


if(a && b && c && d && e && f) {
  // do something

Both examples are still very easy to read and understand despite the number of boolean operations.
Therefore, we suggests to add an exception to the rule that ignores expressions which exclusively contain && or ||.