sandhje / vscode-phpmd

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

Spaces in path cause errors #18

Closed silentdragonz closed 7 years ago

silentdragonz commented 7 years ago

When running on files within a folder that contains spaces causes phpmd to not return output. Looking at the verbose logging the file path isn't quoted. Everything works as expected if the path does not contain any spaces.

php C:\Users\myuser\.vscode\extensions\ecodes.vscode-phpmd-1.0.1\phpmd\phpmd.phar c:\Users\myuser\Documents\Development\My Project\app\Http\Controllers\Admin\MakeController.php xml cleancode,codesize,controversial,design,unusedcode,naming
sandhje commented 7 years ago

Thank you for reporting. I'm able to reproduce this and will fix it ASAP!

sandhje commented 7 years ago

Fixed in release 1.0.2

mignz commented 7 years ago

I believe it's still not working on 1.0.2 (macOS).

Does not work when I set the path to something like:

"phpmd.rules": "/Users/mike/Library/Application Support/Code/User/phpmdruleset.xml"

but works with:

"phpmd.rules": "/Users/mike/phpmdruleset.xml"

Best

sandhje commented 7 years ago

Hmmm. The bug was about spaces in the path for the file being tested, not the path for the ruleset file, so I guess I kind off missed that one. Thanks for pointing out. I'll look into it!

sandhje commented 7 years ago

Closing this bug and continuing work on the "related" issue reported by @Swift-R in issue #23.