benmatselby / sublime-phpcs

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

--level all still valid? #120

Closed Heart1010 closed 10 years ago

Heart1010 commented 10 years ago

I just installed your sublime-phpcs plugin (ST3) and the default php-cs-fixer setting shows

"php_cs_fixer_additional_args": {
        "--level": "all"
    },

...is this --level parameter still valid? I got the following in console (debug set to on) The level "all" is not defined.

The usage doc from php-cs-fixer shows this:

The fix command tries to fix as much coding standards problems as possible on a given file or directory:

php php-cs-fixer.phar fix /path/to/dir
php php-cs-fixer.phar fix /path/to/file

The --level option limits the fixers to apply on the project:

php php-cs-fixer.phar fix /path/to/project --level=psr0
php php-cs-fixer.phar fix /path/to/project --level=psr1
php php-cs-fixer.phar fix /path/to/project --level=psr2
php php-cs-fixer.phar fix /path/to/project --level=symfony

By default, all PSR-2 fixers and some additional ones are run. The "contrib level" fixers cannot be enabled via this option; you should instead set them manually by their name via the --fixers option.

benmatselby commented 10 years ago

Thanks for raising this. This functionality has changed in the newly released version 1.0 of php-cs-fixer. Updated the default settings.