Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order the core ruleset according to the handbook. #645

Merged
merged 1 commit into from
Aug 1, 2016

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Jul 28, 2016

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:

  • Removed the WordPress.WP.I18n sniff from the extra ruleset as it is included in the core ruleset and core is included in extra.
  • Moved the WordPress.WP.PreparedSQL sniff from extra to core as the checks included in that sniff are actually part of the core rules.
  • Moved the Generic.PHP.Syntax to extra 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 ;-)

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:
* Removed the `WordPress.WP.I18n` sniff from the `extra` ruleset as it is included in the `core` ruleset and `core` is included in `extra`.
* Moved the `WordPress.WP.PreparedSQL` sniff from `extra` to `core` as the checks included in that sniff are actually part of the core rules.
* Moved the `Generic.PHP.Syntax` to `extra` 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 ;-)
@jrfnl jrfnl added this to the 0.10.0 milestone Jul 28, 2016
@JDGrimes JDGrimes merged commit 1f21bd8 into develop Aug 1, 2016
@JDGrimes JDGrimes deleted the WPCS/feature/issue-602-reorder-rules-in-ruleset branch August 1, 2016 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants