Closed andretf closed 6 years ago
It is the expected behavior, but you can change the mentioned config property to 0, then it should behave as you described. If not please create a new issue.
(The description in #14 might be useful)
Thank you for you quick response. I'd like to mention that I was thinking your extension do a simple Cyclomatic Complexity (McAbes'). It's nice to cover aspects where CC fails in readability. Although it would be awesome to see in future releases CC (to help writing unit tests), Maintainability Index, etc.
I'm not sure if it's an issue or it's expected from your algorithm calculations. Final sum is always added 1 point, seems it's putting function statement into account instead of just its body (
"codemetrics.luaconfiguration.FunctionDeclaration": 1
).Please see image below, I think it's self explanatory.
text example:
AFAIK, their cyclomatic complexity should be 1 for
a
, 2 forb
, and 0 forc
.