Questions about Cyclomatic Complexity

106 views
Skip to first unread message

Shaun Wilde

unread,
Jul 10, 2011, 5:23:53 AM7/10/11
to gend...@googlegroups.com
Hi 

I am looking to add a cyclomatic complexity metric to my coverage reports from opencover (a .NET code coverage tool hosted on github). I see that Gendarme calculates a value via it's AvoidComplexMethodsRule which I can leverage.

Will anyone object if I link to the gendarme library to calculate this value for me (I see no reason to reinvent the wheel) so I can concentrate on branch and method coverage instrumentation. Also the detection of ternary operator looks interesting where did this come from and is it explained anywhere, looks like magic code to me that needs documentation support?

Finally do we have an accuracy of CC or is it just a metric that we can use as a rule of thumb? 

Shaun

Alexandre Victoor

unread,
Jul 17, 2011, 4:50:51 PM7/17/11
to gend...@googlegroups.com
Hello Shaun
I am not contributing to gendarme or any mono open source project. 
However, I am a user of gendarme and partcover... From my point of view you do not have to relies on gendarme to calculate complexity. OpenCover could be lighter if you just use Cecil and adapt and extract a code fragment from the AvoidComplexMethodsRules class, removing any dependencies to gendarme.  Gendarme is a really great tool, but I do not really see the point to ship it with open cover which purpose is really different. 
I look forward to see branch coverage in open cover :)
Regards

Alex


--
You received this message because you are subscribed to the Google Groups "Gendarme" group.
To post to this group, send email to gend...@googlegroups.com.
To unsubscribe from this group, send email to gendarme+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gendarme?hl=en.

Reply all
Reply to author
Forward
0 new messages