Hi! is it possible to get McCabe complexity (mcc) ...
# detekt
g
Hi! is it possible to get McCabe complexity (mcc) break-up per file/class?
a
Yes it is! However not yet in the project itself. I would totally support a
detekt-metrics
project with LOC, Cyclo- and Cognitive Complexity per file. Good starting points would be: https://github.com/detekt/detekt/blob/0f74942aae645c9ccef325a6e51b49a7a4efc16d/detekt-api/src/main/kotlin/io/gitlab/arturbosch/detekt/api/internal/CyclomaticComplexity.kt#L25 https://github.com/detekt/detekt/blob/f0e1fab1a79b25a84923f1fe3d75ca39951237ee/detekt-rules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/LinesOfCode.kt#L26 A custom output report would also be fancy with some additional average and standard deviation values 🙂
g
Thanks Artur, I will await for this feature or will make some time to contribute 🙂