Inspectopedia
 
2024.3

Boolean method is always inverted

Warning
New
Last modified: 03 December 2024

Reports methods with a boolean return type that are always negated when called.

A quick-fix is provided to invert and optionally rename the method. For performance reasons, not all problematic methods may be highlighted in the editor.

Example:

After the quick-fix is applied: