Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If the PHPCS ruleset is named `.phpcs.xml`, `phpcs.xml`, `.phpcs.xml.dist` or `phpcs.xml.dist`, it will automatically be picked up by PHPCS and you don't need to pass the ruleset name anymore. Additionally, using a `.dist` file for a repo ruleset allows for individual developers to overrule the ruleset with a custom version (without the `.dist` file extension). This makes testing of new additions/changes to the ruleset easier. The master ruleset can be imported into a custom ruleset by using `<rule ref="./.phpcs.xml.dist"/>`. Since PHPCS 3.1.0, it is also possible to use dot-prefixed files for the PHPCS config, allowing these files to be sorted with other configuration related files. The loading order of the ruleset files in PHPCS, as of version 3.1.1., is: 1. `.phpcs.xml` 2. `phpcs.xml` 3. `.phpcs.xml.dist` 4. `phpcs.xml.dist` References: * https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file * https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.1.0 * https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.1.1 (change in the file loading order)
- Loading branch information