A boolean expression has more && and || operators than the configured maximum
What it finds
A condition with many && and || is hard to read and to get right, especially when both are mixed. Naming parts of it with local variables or small functions says what is being tested. The operators of the largest boolean expression count; one that is part of a larger one is not reported separately. The maximum is the parameter max_operators, 4 by default.
From the rule's source, complex_condition.rs.
Turn it on, off or suppress it
The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/rust:complex-condition" = "warning"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/rust:complex-condition] reason="..."tx0 explain tx0/rust:complex-condition shows the same in the terminal. Found a false positive? Report it.