Closed whiteheadrj closed 7 years ago
@whiteheadrj
Hi there, you may need to set this:
// Options include:
// - Sniffer
// - Fixer
// - Mess Detector
//
// This will prepend the application with the path to php
// Needed for windows, or anyone who doesn't/can't make phars
// executable. Avoid setting this if at all possible
"phpcs_commands_to_php_prefix": [],
I have modified the phpcs_commands_to_php_prefix setting per your recommendation:
// The path to the php executable.
// Needed for windows, or anyone who doesn't/can't make phars
// executable. Avoid setting this if at all possible
"phpcs_php_prefix_path": "/usr/local/bin/php",
// Options include:
// - Sniffer
// - Fixer
// - Mess Detector
//
// This will prepend the application with the path to php
// Needed for windows, or anyone who doesn't/can't make phars
// executable. Avoid setting this if at all possible
"phpcs_commands_to_php_prefix": ["Mess Detector"],
I also changed phpmd_executable_path to not have to redirect through a symbolic link.
I am still having the same issue:
[Phpcs] Project files:
[Phpcs] Current: /Users/rjwhitehead/Documents/nsaWeb.sublime-project
[Phpcs] Last Known: /Users/rjwhitehead/Documents/nsaWeb.sublime-project
[Phpcs] Project files are the same, skipping reload
[Phpcs] /Users/rjwhitehead/.composer/vendor/phpmd/phpmd/src/bin/phpmd /Users/rjwhitehead/nsaWeb/webroot/globals/utils/dispatch.class.php text codesize,unusedcode
[Phpcs] /Users/rjwhitehead/.composer/vendor/phpmd/phpmd/src/bin/phpmd /Users/rjwhitehead/nsaWeb/webroot/globals/utils/dispatch.class.php text codesize,unusedcode
[Phpcs] cwd: /Users/rjwhitehead
[Phpcs] env: php: No such file or directory
[Phpcs] MessDetector found 0 errors
@whiteheadrj
I think there is a type in our docs. Try this:
"phpcs_commands_to_php_prefix": ["MessDetector"],
That solved it. Thanks! I created a pull request to update the doc so that other people don't run into the same issue.
@whiteheadrj Sorry about the delay! Thank you for replying and raising the PR
I am stumped.
I have reviewed the config option (http://benmatselby.github.io/sublime-phpcs/#configuration) I have reviewed the common errors in the FAQ in the readme (https://github.com/benmatselby/sublime-phpcs/blob/master/README.md) While similar to https://github.com/benmatselby/sublime-phpcs/issues/116, it isn't quite the same.
OS: MacOS 10.12.16 PHP 5.3.29 PHPMD installed today via composer
I am getting the following output in the console when trying to run phpmd triggered by the save event:
However, I can copy and paste the command into the terminal and it works just fine:
Here is my current user config:
Hopefully, I am missing something silly. Thanks for your help.