org.sonar.l10n.delphi.rules.community-delphi.CognitiveComplexityRoutine.html Maven / Gradle / Ivy
Why is this an issue?
Cognitive Complexity is a measure of how hard the control flow of a routine is to understand.
This can be caused by excessive use of:
- Loop structures, like
for
and while
- Conditionals, like
if
, catch
and case
- Recursive sequences
Routines with high Cognitive Complexity will be difficult to maintain, as a very non-linear
control flow is difficult to follow.
How to fix it
Refactor the method to use less loops, conditionals, or recursion.
Resources
© 2015 - 2024 Weber Informatics LLC | Privacy Policy