I've been trying to configure phpmd to work with PhpStorm, but I'm stuck here. Here's the error I have:
PHP Mess Detector
phpmd: Can not correctly run the tool with parameters:
C:/Users/me/AppData/Local/Temp/___18.tmp/folder/myclass.php
xml codesize,controversial,design,naming,unusedcode
Possible tool process hangup after 5 sec.
I am using PhpStorm on Windows. The strange thing is that it seems to run when I do Code > Inspect Code
, just not with live inspection.
Thing is my path isn't this one, my files are located in C:/Users/Code/myapp
.
Can anyone help me with this error?
PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend. https://phpmd.org.
Last modified: 01 August 2022. In addition to built-in coding assistance, PhpStorm provides checking the source code through integration with the PHP Mess Detector tool, which detects potential problems related to code size, inconsistency, unused code, violation of naming conventions, poor design, and so on.
In my case,the problem was that the Tool Process Timeout was setted to 5 second. I set to 30 second and now it works fine ! We can configure it through Languages & Framework | PHP | Mess Detector | Development Environnement | Configuration ... | Tool process timeout, sec[1..30]
I suppose that this solution is also ok for PHP Code Sniffer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With