From 15513bd5c12e8bb2df2a58d1e84c74764b8b7d87 Mon Sep 17 00:00:00 2001 From: Justin Foell Date: Thu, 22 Jun 2017 10:25:58 -0500 Subject: [PATCH 01/10] Renamed directory to play nicely with class names for custom sniffs --- .gitignore | 1 + {WebDevStudios-phpcs => WebDevStudios}/ruleset.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .gitignore rename {WebDevStudios-phpcs => WebDevStudios}/ruleset.xml (95%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b25c15b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*~ diff --git a/WebDevStudios-phpcs/ruleset.xml b/WebDevStudios/ruleset.xml similarity index 95% rename from WebDevStudios-phpcs/ruleset.xml rename to WebDevStudios/ruleset.xml index 10a4a54..4a81b13 100644 --- a/WebDevStudios-phpcs/ruleset.xml +++ b/WebDevStudios/ruleset.xml @@ -1,5 +1,5 @@ - + From 61f4afe116f99cf93df5c02d3d6ed1d3e8e86fe9 Mon Sep 17 00:00:00 2001 From: Aubrey Portwood Date: Thu, 22 Jun 2017 09:09:44 -0700 Subject: [PATCH 02/10] Not the folder changes in the readme. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a0f1df3..8d1c0c6 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ 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 @@ -18,20 +18,20 @@ 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. From ea738899531d3e8e64eb8eeea25db54e80dffc9f Mon Sep 17 00:00:00 2001 From: Aubrey Portwood Date: Thu, 22 Jun 2017 09:12:25 -0700 Subject: [PATCH 03/10] Add changelog to readme. --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d1c0c6..8842f04 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` 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 @@ -35,3 +38,15 @@ The installed coding standards are PSR1, Squiz, MySource, PSR2, Zend, PEAR, PHPC ``` > 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) + +## 1.0 + +- Initial ruleset based on WordPress-Extra From 28cff1a08d66d8787d9acfeb797bf79e193147c4 Mon Sep 17 00:00:00 2001 From: Aubrey Portwood Date: Thu, 22 Jun 2017 09:17:24 -0700 Subject: [PATCH 04/10] Note that this change breaks things. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 8842f04..2682efd 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,10 @@ ____________________ - 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) +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 From 8aed05e2b2b207b0afeabdb9ac9fb85599fe4e54 Mon Sep 17 00:00:00 2001 From: Aubrey Portwood Date: Thu, 22 Jun 2017 09:35:41 -0700 Subject: [PATCH 05/10] Add contributing.md --- CONTRIBUTING.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..445dfba --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,10 @@ +When adding any changes, each change must go through the following PR process: + +- Branch off the latest release branch in development +- Add your changes to your branch +- Document your changes in `README.md` under the release, and link to your issue or PR +- Submit PR against the release branch (if your PR is not entirely complete, add the `Not Ready` tag and it can be ignored) +- Add the PR to the release milestone +- PR must be tested at least against Sublime, Atom, PHP Storm, and CLI; there are labels for each of these, 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, so request those +- Once your PR is approved/reviewed, it can only be merged into `master` by a lead From 1a549cfc4b8cc7cf4e4e6a7a29195dd16fa7f95d Mon Sep 17 00:00:00 2001 From: Aubrey Portwood Date: Thu, 22 Jun 2017 09:44:15 -0700 Subject: [PATCH 06/10] How will we determine a new rule to be valid? --- CONTRIBUTING.md | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 445dfba..e5f5331 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,10 +1,19 @@ -When adding any changes, each change must go through the following PR process: - -- Branch off the latest release branch in development -- Add your changes to your branch -- Document your changes in `README.md` under the release, and link to your issue or PR -- Submit PR against the release branch (if your PR is not entirely complete, add the `Not Ready` tag and it can be ignored) -- Add the PR to the release milestone -- PR must be tested at least against Sublime, Atom, PHP Storm, and CLI; there are labels for each of these, request this from other users of these editors, or some may volunteer +# 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; 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, so request those -- Once your PR is approved/reviewed, it can only be merged into `master` by a lead +- Once your PR has the correct number of votes, and is fully reviewed, it can only be merged into `master` by a lead + +# 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. From f56d2800c34078e81cac81e0e0ea885c46cda257 Mon Sep 17 00:00:00 2001 From: Aubrey Portwood Date: Thu, 22 Jun 2017 09:57:40 -0700 Subject: [PATCH 07/10] Be more clear about the labels. --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e5f5331..0f465d2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,9 +7,9 @@ When adding __any__ changes, each change must go through the following PR proces - 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; 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, so request those -- Once your PR has the correct number of votes, and is fully reviewed, it can only be merged into `master` by a lead +- 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) # Additional Approval of New Rules From b3723ff8fb11a412c95b39a809b082251544a5b1 Mon Sep 17 00:00:00 2001 From: Aubrey Portwood Date: Thu, 22 Jun 2017 10:02:24 -0700 Subject: [PATCH 08/10] Or, the lead can just merge it right in. --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0f465d2..a1a10bd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ When adding __any__ changes, each change must go through the following PR proces - 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) +- 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 From 2661815e4f169fcaa6a289e6e4e122c79bf8cee3 Mon Sep 17 00:00:00 2001 From: Aubrey Portwood Date: Thu, 22 Jun 2017 10:17:04 -0700 Subject: [PATCH 09/10] Get WordPress-Docs in there. --- WebDevStudios/ruleset.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WebDevStudios/ruleset.xml b/WebDevStudios/ruleset.xml index 4a81b13..8332a32 100644 --- a/WebDevStudios/ruleset.xml +++ b/WebDevStudios/ruleset.xml @@ -15,6 +15,9 @@ + + + From 758bc8487dd3e6055a27cae2b1b0a038b232dc9e Mon Sep 17 00:00:00 2001 From: Aubrey Portwood Date: Thu, 22 Jun 2017 10:17:54 -0700 Subject: [PATCH 10/10] Note the addtion of WordPress-Docs. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2682efd..af8b128 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ ____________________ ## 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