squizlabs / sublime-PHP_CodeSniffer

Sublime Text plugin for PHP_CodeSniffer
51 stars 14 forks source link

run_on_save not working? #8

Open ghost opened 4 years ago

ghost commented 4 years ago

Hi there,

I've just installed this and have it working using ALT + S as well as the options to Check/Fix a file in Sublime > Tools. This works great!

However I have in my User config run_on_save set to true but nothing seems to happen after I hit save. Here is my User config:

{
     // Run PHPCS when a buffer is saved.
    "run_on_save": true,

    "phpcs_standard": "PSR2",

    // Path to the PHPCS script.
    "phpcs_path": "/Users/ralphmorris/phpspecs/PHP_CodeSniffer/bin/phpcs",

    // Path to the PHPCBF script.
    "phpcbf_path": "/Users/ralphmorris/phpspecs/PHP_CodeSniffer/bin/phpcbf",
}

If I move a bracket into the wrong position and then do Shift + Option + S it fixes it. But on save, nothing.

I'm unsure how to debug this. Any ideas?

Thanks Ralph

andremacola commented 4 years ago

Fixed on my: https://github.com/andremacola/sublime-PHP_CodeSniffer

And it is working on ST4 Dev build too.

I just created a PR with several improvements, but I don't known if any author/core developer is viewing this repo now.