Anton Bogomazov10/30/2023, 10:03 AM
• 36 number of properties
• 65 number of functions
• 32 number of classes
• 4 number of packages
• 32 number of kt files
• 953 lines of code (loc)
• 783 source lines of code (sloc)
• 466 logical lines of code (lloc)
• 0 comment lines of code (cloc)
• 94 cyclomatic complexity (mcc)
• 16 cognitive complexity
• 0 number of total code smells
• 0% comment source ratio
• 201 mcc per 1,000 lloc
• 0 code smells per 1,000 llocAnd questions are: What's the point of measuring MCC and Cognitive Complexity for the whole module in absolute numbers? I'd rather expect an average MCC per function. Do we have some report references for archetypes of projects, e.g. 'small - complex logic - well-designed' or 'huge - simple logic - big ball of mud'? In the end, I do not understand if I did good work in terms of design or not and I be happy to hear your expert opinion. Thanks!
schalkms10/31/2023, 11:21 PM
average MCC per functionIt seems you should take a look at the
rule, which uses MCC internally.
Do we have some report references for archetypes of projectsYou could take a look at the statistics of detekt. We do dogfooding and run detekt on the detekt code base itself.
In the end, I do not understand if I did good work in terms of design or notThat's what the rules are there for. If you have 0 code smells, then you have done a good job. However, it depends heavily on which rules you have enabled. I assume you used the default configuration for detekt's rules.
Anton Bogomazov11/03/2023, 8:40 AM
It seems you should take a look at theThank you, that's exactly what I was looking for!rule