Possible-Incorrect-Bitwise-Operator
Documentation Index
Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt
Use this file to discover all available pages before exploring further.
Sourcery rule id: possible-incorrect-bitwise-operator
Section titled “Sourcery rule id: possible-incorrect-bitwise-operator”Description
Section titled “Description”Flags possibly incorrect use of bitwise operators | and &.
if (x & y) {}Explanation
Section titled “Explanation”Although bitwise operators are valid in boolean contexts, it’s more likely to be a programming error, as it’s
easy to mix up & with && and | with ||.