https://kotlinlang.org logo
#detekt
Title
# detekt
g

Gopal S Akshintala

04/11/2020, 12:35 PM
Hi! is it possible to get McCabe complexity (mcc) break-up per file/class?
a

Artur Bosch

04/11/2020, 6:26 PM
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

Gopal S Akshintala

04/12/2020, 6:08 AM
Thanks Artur, I will await for this feature or will make some time to contribute 🙂
5 Views