diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b25c15b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*~ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..a1a10bd --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,19 @@ +# Changes + +When adding __any__ changes, each change must go through the following PR process: + +- Branch off the latest release branch in development, e.g. `release-x.x` +- Add your changes +- Document your changes in `README.md` under the release changelog, and link to your issue or PR +- Submit PR against the release branch (if your PR is not entirely complete, add the `Not Ready` label and it will be ignored until you remove it) +- Add the PR to the release milestone too +- PR must be tested at least against Sublime, Atom, PHP Storm, and CLI; there are labels for each of these and must have them all (request this from other users of these editors, or some may volunteer) +- Once the PR has been tested in all editors, a complete review from a Senior Developer and a Lead is required (Add the `Lead/Senior Review Needed` label so we can notice those, remove this label when the two reviews are done) +- Once your PR has the correct number of votes, and is fully reviewed, it can only be merged into `master` by a lead (add the `Ready For Lead Merge` label when it's ready for this, or the lead can just merge it right in) + +# Additional Approval of New Rules + +Changes that introduce new rules require at least 5 votes/blessings. Two of them +must be from a lead. Once a new rule has these 5 votes, add the `Approved Rule` +label and it can be merged in immediately if it's been tested in the above +editors. diff --git a/README.md b/README.md index a0f1df3..af8b128 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,16 @@ A repository to house all our linting and coding standards. ## PHP Code Sniffer -The PHP CS ruleset exists under the `/WebDevStudios-phpcs` folder of the repo, this is so later we can add custom sniffs, and maybe even dependant rulesets. + +The PHP CS ruleset exists under the `/WebDevStudios` folder of the repo, this is so later we can add custom sniffs, and maybe even dependant rulesets. ### Installation + * Clone the repo to your desired location * Check if you already have `installed_paths` set by running `phpcs --config-show` -__(Example output)__ +#### Example output + ``` $> phpcs --config-show installed_paths: /home/wpcs @@ -18,20 +21,37 @@ installed_paths: /home/wpcs * Set your installed standards path(s). ``` -phpcs --config-set installed_paths /home/WDS-Coding-Standards/WebDevStudios-phpcs +phpcs --config-set installed_paths /home/WDS-Coding-Standards/WebDevStudios ``` If you alread had an installed path, just add that with a comma ``` -phpcs --config-set installed_paths /home/WDS-Coding_Standards/WebDevStudios-phpcs,/home/wpcs +phpcs --config-set installed_paths /home/WDS-Coding_Standards/WebDevStudios,/home/wpcs ``` * Confirm your installation is complete ``` $> phpcs -i -The installed coding standards are PSR1, Squiz, MySource, PSR2, Zend, PEAR, PHPCS, WebDevStudios-phpcs, WordPress-Core, WordPress-VIP, WordPress-Extra, WordPress-Docs and WordPress +The installed coding standards are PSR1, Squiz, MySource, PSR2, Zend, PEAR, PHPCS, WebDevStudios, WordPress-Core, WordPress-VIP, WordPress-Extra, WordPress-Docs and WordPress ``` > Full list of [Configuration Options](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options) over at the PHP_CodeSniffer wiki. + +____________________ + +# Changelog + +## 1.0.1 + +- Changed `WebDevStudios-phpcs` to just `WebDevStudios` for compatibility with namespaces and new sniffs added later [#12](https://github.com/WebDevStudios/WDS-Coding-Standards/pull/12) +- Inclusion of the `WordPress-Docs` ruleset + +Note, this release breaks some things. When you update to this version, +you will need to update your coding standard to `WebDevStudios` vs the old +`WebDevStudios-phpcs` which should no longer work. + +## 1.0 + +- Initial ruleset based on WordPress-Extra diff --git a/WebDevStudios-phpcs/ruleset.xml b/WebDevStudios/ruleset.xml similarity index 92% rename from WebDevStudios-phpcs/ruleset.xml rename to WebDevStudios/ruleset.xml index 10a4a54..8332a32 100644 --- a/WebDevStudios-phpcs/ruleset.xml +++ b/WebDevStudios/ruleset.xml @@ -1,5 +1,5 @@ - + @@ -15,6 +15,9 @@ + + +