Closed ruimaranhao closed 3 years ago
I would say yes. The used formula is https://github.com/priv-kweihmann/multimetric/blob/c3a7cb472d995ecfe4f1ee8f2b08cd8f26af7bde/multimetric/cls/metric/cyclomatic.py#L45. The used file has 3 exit points (the return statements) and 2 used conditionals, which will make it max(2 - (3 + 2), 0) = 0. And the used code isn't really complex so the result looks reasonable to me
I've just run multimetric for the example in https://github.com/priv-kweihmann/multimetric/blob/master/testfiles/test.c, and I get 0 for cyclomatic complxity. Is this correct ?