benmatselby / sublime-phpcs

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

Ordering of commands #126

Open Beanow opened 9 years ago

Beanow commented 9 years ago

The ordering seems to cause some issue. For example:

{
    "phpcs_sniffer_run": true,
    "phpcs_command_on_save": false,
    "phpcs_show_errors_on_save": false,
    "php_cs_fixer_on_save":true,
    "phpmd_run": true,
    "phpmd_command_on_save": true
}

This will add the mess detector markers, but remove them shortly after if the cs fixer makes any changes to the file. Ideally some form of ordering is available to be able to customize this behaviour.

benmatselby commented 9 years ago

@Beanow Hi there

I've just been looking into this and it's an interesting one. Technically the php-cs-fixer is running first, from what I can see, but the sniffers run after but don't see the fixer change.. I see the opposite of you. So I actually see the markers in the gutter, but they are wrong, because the fixer has fixed the issues.

So are you wanting to run the fixer, and then see what sniffs are found afterwards?

Beanow commented 9 years ago

Yes, I think the fixer settings are easy to define and predictable. I would expect it to 'silently' fix them and sniff afterwards.

Ben Selby notifications@github.com schreef op 24 augustus 2015 22:05:27 CEST:

@Beanow Hi there

I've just been looking into this and it's an interesting one. Technically the php-cs-fixer is running first, from what I can see, but the sniffers run after but don't see the fixer change.. I see the opposite of you. So I actually see the markers in the gutter, but they are wrong, because the fixer has fixed the issues.

So are you wanting to run the fixer, and then see what sniffs are found afterwards?


Reply to this email directly or view it on GitHub: https://github.com/benmatselby/sublime-phpcs/issues/126#issuecomment-134360453