Negatively named boolean variable
Reports negatively named variables, for example: disabled
, hidden
, or isNotChanged
.
Usually, inverting the boolean
value and removing the negation from the name makes the code easier to understand.
Example:
boolean disabled = false;
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Java, 233.SNAPSHOT |
Last modified: 13 July 2023