Data flow
- Boolean method is always inverted
Reports methods with a boolean return type that are always negated when called.
- Boolean variable is always inverted
Reports boolean variables or fields which are always negated when their value is used.
- Law of Demeter
Reports Law of Demeter violations.
- Negatively named boolean variable
Reports negatively named variables, for example: disabled, hidden, or isNotChanged.
- Redundant local variable
Reports unnecessary local variables that add nothing to the comprehensibility of a method, including: Local variables that are immediately returned.
- Reuse of local variable
Reports local variables that are "reused" overwriting their values with new values unrelated to their original use.
- Scope of variable is too broad
Reports any variable declarations that can be moved to a smaller scope.
- Use of variable whose value is known to be constant
Reports any usages of variables which are known to be constant.
Last modified: 11 September 2024