Is there an approach to collect/report on unit test coverage based on a complexity ratio such as Cyclomatic Complexity on a method/function level?
The reason/intent is to provide a measurable metric to show any areas that have a higher chance of defects based on complexity actually have appropriate unit test coverage (i.e. a metric away out of '100%' or '80%' coverage by changing the metric to '100% of Cyclomatic Complexity >= 10 for example).
My usecase is currently Java/junit, and a different approach to reach the same intent would also be helpful (doesn't have to be exactly method/function based on Cyclomatic, but similar type of measurement).
EDIT: if there is a code coverage tool with similar features for both java and .NET, that would be phenomenal.
thanky! -Darren