Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build/PHPCS: Rename PHPCS configuration file
This rename has two functions: 1. Using a `.dist` extension allows for individual developers to overload the `phpcs.xml.dist` with a local `phpcs.xml` file. This file can include the `dist` file as a base ruleset using `<rule ref="./phpcs.xml.dist"/>`. 2. Since [PHPCS 3.1.0](https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.1.0) allows for config files to start with a `.`. We can use this feature to have a separate ruleset for the Free and the Premium plugin. The loading order of the files is `.phpcs.xml`, `phpcs.xml`, `.phpcs.xml.dist`, `phpcs.xml.dist` (as of [PHPCS 3.1.1](https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.1.1)). By naming the config file for WPSEO Free `phpcs.xml.dist`, we can automatically overrule that config in the Premium plugin by having the Premium PHPCS config be called `.phpcs.xml.dist`. To facilitate (1), the typical file names for the overloaded PHPCS config files have been added to the `.gitignore` and `.gitattributes` files.
- Loading branch information