sandhje / vscode-phpmd

VSCode PHP Mess Detector extension
MIT License
15 stars 4 forks source link

An error occured, no output was received after executing the phpmd command #54

Open gremo opened 4 years ago

gremo commented 4 years ago

[Info - 21:57:46] Document saved, starting validation. [Info - 21:57:46] PHP Mess Detector validation started for file:///c%3A/Progetti/example.com/src/Admin/CategoryHasFeatureAdmin.php [Info - 21:57:46] PHP Mess Detector command not using global PHP, skipping PHP test [Info - 21:57:46] Building phpmd version command: vendor/bin/phpmd.bat --version [Error - 21:57:46] An error occured during document validation after save with the following message: An error occured, no output was received after

Any help? My configuration is basically this (locally phpmd, workspace settings):

  "phpmd.command": "vendor/bin/phpmd.bat",
  "phpmd.rules": "cleancode,codesize",
  "phpmd.verbose": true

The command is working just fine from the terminal:

PS C:\Progetti\example.com> vendor/bin/phpmd.bat --version PHPMD 2.8.1

VSCode version:

PS C:\example.com> code --version 1.45.0 d69a79b73808559a91206d73d7717ff5f798f23c x64

sandhje commented 4 years ago

Hi,

The paths in your log indicate you are on a windows system but your config value uses forward slashes. Could you try using backslashes in your phpmd.command setting. I'm guessing that will do the trick.

gremo commented 4 years ago

Hai, thanks, I will try. Anyways, do you think that this could be fixed in the next release? The workspace settings could be shared and versioned, you know 😉

sandhje commented 4 years ago

I'll add it to the list, I'll probably be working on a new release by the last quarter of this year... A PR is always welcome though :stuck_out_tongue_winking_eye: