benmatselby / sublime-phpcs

🔍 PHP CodeSniffer, PHP Coding Standard Fixer, Linter, and Mess Detector Support for Sublime Text
Other
814 stars 126 forks source link

phpcbf installed, grayed-out in menu #129

Closed matthewpizza closed 9 years ago

matthewpizza commented 9 years ago

Using 6.6.0, I am unable to run the PHP Code Beautifier and Fixer in Sublime Text 3. phpcbf is installed, but the menu item is grayed-out.

Below is a screenshot of the flyout menu:

image

These are my user settings, confirmed paths are correct:

{
    "phpcs_executable_path": "/usr/local/bin/phpcs",
    "phpcs_additional_args": {
        "--standard": "WordPress",
        "-n": ""
    },
    "phpcbf_executable_path": "/usr/local/bin/phpcbf",
    "phpcbf_additional_args": {
        "--standard": "WordPress",
        "-n": ""
    }
}

Questions:

Thanks in advance for any help!

benmatselby commented 9 years ago

Good spot, it's a bug on line 705:

https://github.com/benmatselby/sublime-phpcs/blob/master/phpcs.py#L705

Will get a fix soon for you, in the mean time you could just define php_cs_fixer_executable_path

matthewpizza commented 9 years ago

@benmatselby Will do, thanks!

benmatselby commented 9 years ago

This should now be resolved in v6.6.1 @matthewspencer

I have to show it as enabled as I don't have access to which tool you want to use for the menu, so now I display an error if you cannot use that tool.

Not great I have to say, but a workable solution

matthewpizza commented 9 years ago

@benmatselby Thank you!