vendredi 16 septembre 2016

Do if-statements with many conditions increase cyclomatic complexity?

I learned a while ago that in regards to code quality, it is highly recommended to keep the cyclomatic complexity as low as possible.

Now I know that if-statements, switches, etc. increase the cyclomatic complexity. But how about the number of conditions inside that if-statement? For example, I'm working with source code right now, where one if-statement can have 40 different conditions. Does each condition increase cyclomatic complexity? These are OR conditions, if that makes a difference.

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire