Inspectopedia
 
2024.3

Negatively named boolean variable

Warning
New
Last modified: 03 December 2024

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: