Php-cs-fixer: Where can I find default configuration?

Created on 13 Sep 2018  路  2Comments  路  Source: FriendsOfPHP/PHP-CS-Fixer

Hello. I want to find default rule set used by PHP-CS-Fixer in .php_cs format. Didn't find it in docs. It's easier to maintain project codestyle when you can look at config and understand what will be happened when you'll run the fixer.

Is it just ['@PSR2' => true]?

kinquestion

All 2 comments

README.rst serves for docs in this case - each rule has an information to which ruleset it belongs.

Rulesets are defined here.

And if you only want to see what will be fixed you can use flags --dry-run --diff.

Indeed, default ruleset is @PSR2, it's defined by our code: https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/2.12/src/Config.php#L34

if you may, please raise a PR to expose it in readme as well, thanks !

in the meantime, I'm closing this question, as your question has been answered

Was this page helpful?
0 / 5 - 0 ratings

Related issues

erickskrauch picture erickskrauch  路  25Comments

sharifzadesina picture sharifzadesina  路  30Comments

kalessil picture kalessil  路  36Comments

PeterDaveHello picture PeterDaveHello  路  19Comments

GrahamCampbell picture GrahamCampbell  路  21Comments