Repository navigation
Released version 1.4.0
Starting with DressCode no longer means writing a configuration. dresscode init measures your code and writes one that fits it, and a project coming from PHP CS Fixer, PHP_CodeSniffer or Laravel Pint brings its configuration and its suppression comments along.
dresscode init– takes the measurements of your code (indentation, line width, quotes, where a condition spread over lines begins and ends, and every other decision), picks the standard closest to it and writes adresscode.neonmade to measure, with the scope your formatter or git already knows and generated files and test data left out. Where the code leaves a choice open, it asks, showing what the fix would do to a real place in your code;--dry-runonly prints the proposal,--yestakes the recommended answers- Standards
symfonyandlaravel– the Symfony Coding Standards as the@Symfonyset of PHP CS Fixer has them, and the style Laravel Pint writes by default, besideperCs,psr12andnette dresscode migrate config– finds the configuration of PHP CS Fixer, PHP_CodeSniffer (Slevomat included) or Laravel Pint the project runs, translates its rules and their options todresscode.neonand lists at the end of the file what it could not carry over.explainand the catalogue show the names each decision has in those tools- phpcs comments keep working –
phpcs:ignore,phpcs:disable/enable,phpcs:ignoreFileand@phpcsSuppresssilence the decisions their sniff translates to, so the code needs no change on the first day;dresscode migrate suppressionsrewrites them todresscode:ignorewhenever you like - Baseline found by itself – a
dresscode-baseline.neonin the root applies without the configuration naming it, and the header ofchecksays which baseline is in use. A baseline the configuration names must now exist