Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPMD cannot run with parameters

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?

like image 792
Tristan Rollet Avatar asked Aug 22 '16 08:08

Tristan Rollet


People also ask

What is Phpmd?

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.

What is PHP mess detector?

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.


1 Answers

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

enter image description here

like image 161
SkaJess Avatar answered Oct 04 '22 00:10

SkaJess