PHPStorm not showing Cyclomatic complexity with PHPMD
Hello,
I have installed PHPMD globally through composer and configured PHPMD under Settings > Inspections > PHP > PHP Mess Detector Validation
There I have selected all optionsm including the 'Code Size Rules'. According to the documentation this code rule should also enable the Cyclomatic Complexity validation.
https://phpmd.org/rules/index.html#code-size-rules
The strange thing is that all the other rules are in effect though.
Could really use some help with this.
The path I am using for Mess detector:
/home/<user>/.composer/vendor/phpmd/phpmd/src/bin/phpmd
Running on ubuntu 16.04
Please sign in to leave a comment.
What code sample are you using?
I've tried with a default one from here, and it seems to work (Ubuntu 16.04, global PHPMD 2.5.0 installed with Composer):
I tried it with your example, while I was fidgeting around with it my cyclomatic complexity showed up. It took a really long time though. So I guess the problem is that whenever I open a file it takes a long to for the CCN to show up. Could anything be done about that?
You can run Code > Inspect Code & select an Inspection profile you've configured. How long would it take to pass?