Closed hgn closed 6 years ago
I think there is an option already, which is —modified
. I think the help message can be improved.
On 21 Nov 2017, at 4:07 AM, Hagen Paul Pfeifer notifications@github.com wrote:
One major cited disadvantage with Cyclomatic Complexity are switch/case statements. Using lizard in larger projects the upper 10% are valid switch case statements where you never want to replace this code. Even more: nearly no switch case statement in the analysed code can or will be replaced - they are all fine.
Idea: add an option to exclude switch/case statements from the analysis. Will be helpful for a lot of projects!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/terryyin/lizard/issues/201, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwJYg_ll4DDOvahhijrX4LDjSc7BCd2ks5s4dvsgaJpZM4Qk0qB.
Great news! Yes the help message should be extended to understand this aspect. Are there any other side aspects or is it just "remove switch/case" from the statistics?
The only change is counting "switch" instead of counting "case". Yeah, the option "--modified" is a bit over generalisation for something very specific:-)
Will add it to the help and readme.
Perfect! Thank you @terryyin
One major cited disadvantage with Cyclomatic Complexity are switch/case statements. Using lizard in larger projects the upper 10% are valid switch case statements where you never want to replace this code. Even more: nearly no switch case statement in the analysed code can or will be replaced - they are all fine.
Idea: add an option to exclude switch/case statements from the analysis. Will be helpful for a lot of projects!