Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added an example with screenshots

...

This rule analyses all expressions and determines whether they are complex by looking at the amount of operators, words and nested collect statements..

Possible

...

improvement

Try to split up some part of the expression, either as reusable expression or in an intermediate attribute. If this is not possible make sure to put comments in the expression explaining what is happening.

Example

This expression is considered too complex (and unnecessarily complex as well, because the desired result could simply be achieved by SUM( COLLECT Person.PersonalPremium FROM ALL Person )! )

Image Added

It results in this code smell:

Image Added