Order the core
ruleset according to the handbook.
#645
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR does not add or remove any new rules, it just re-orders the core ruleset to follow the handbook and documents the rules as they are in the handbook - both covered and not covered.
Closes #602
For any core rules which are not yet covered, but could possibly be covered, a new issue has been opened if one didn't exist already and the link to the issue is included in the ruleset.
Rules included, but not (explicitly) covered in the handbook are listed in their own section at the bottom of the ruleset.
I've made three changes which should be noted:
WordPress.WP.I18n
sniff from theextra
ruleset as it is included in thecore
ruleset andcore
is included inextra
.WordPress.WP.PreparedSQL
sniff fromextra
tocore
as the checks included in that sniff are actually part of the core rules.Generic.PHP.Syntax
toextra
as IRL often enough there will be code which will only be loaded for higher PHP versions with a wrapper and fall-backs for lower PHP versions.Feedback welcome. Review is probably easiest by just looking at the new version of the file as the diff will be horrible ;-)