Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This rule detects if the condition in a condition node contains logical or mathematical equality operators, or results in a constant value.

...

This is an example of how it should not be done.

Image RemovedImage Added

Move the value check to the alternatives, so the condition doesn't contain any operators anymore.

Image RemovedImage Added

This flow results in the following code smell:

...