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

Proposal: additional rulesets #168

Open
jrfnl opened this issue Jul 28, 2018 · 3 comments
Open

Proposal: additional rulesets #168

jrfnl opened this issue Jul 28, 2018 · 3 comments
Labels
issue: input/decision needed meta Everything to do with the repo structure and organisation.

Comments

@jrfnl
Copy link

jrfnl commented Jul 28, 2018

As this repo was (is) a fork from WPCS, when this project started, it was decided to create a WordPress-Theme ruleset in line with existing rulesets in WPCS.

However, things change. And one of the things which is about to change is that the repo will be de-forked from WPCS.

This means that it can, from that point onwards, the TRTCS can choose its own standard name and have additional rulesets too.

Part 1 of this - standard name - is outlined in issue #167.
This issue is about adding additional rulesets.

Proposal: have a WPTheme-Required and a WPTheme-Extra ruleset

WPCS has the WordPress-Core and WordPress-Extra rulesets, with WordPress-Core only containing the sniffs which are line with what's documented in the WP Core handbook and WordPress-Extra containing additional best practices and sniffs which are candidates to go into Core, but not yet discussed/approved.

Similar to this, I would like to suggest for this repo to also have two additional rulesets:

  • WPTheme-Required with everything which is in the handbook.
  • WPTheme-Extra with sniffs covering additional best practices and sniffs which cover rules which have been proposed to the TRT, but have not (yet) been approved.

The "main" ruleset would then just contain the references to these two rulesets - again, similar to the WordPress ruleset in WPCS -. In practice, the "main" ruleset would be the same as the Extra ruleset.

There are already a number of sniffs now in the main Theme ruleset over which there is still a discussion going about whether they belong there, so splitting the ruleset into these two would solve the problem there and prevent those discussions from hindering continued development in this repo.

In practice, what I propose would result in:

  • WPTheme - the Theme native sniffs would live in this directory and the ruleset would include the Required and Extra rulesets
  • WPTheme-Required - directory with only a ruleset
  • WPTheme-Extra - directory with only a ruleset. Ruleset would include WPTheme-Required and references to additional sniffs.

Ruleset names

Regarding the names Required may not be the best name as that ruleset will also contain approved best practices and recommendations, so suggestions for better names for the rulesets would be very welcome.

For the prefix, I would suggest to keep that in-line with whatever is decided in issue #167.

Timing

This does not need to be decided upon before the de-forking from WPCS as this can be handled in a separate PR after the de-forking has been done.

I would, however, recommend deciding about this in the near future.

@jrfnl jrfnl added the meta Everything to do with the repo structure and organisation. label Jul 28, 2018
@justintadlock
Copy link

For the WPTheme-Required, maybe WPTheme-Standard?

@joyously
Copy link

joyously commented Jun 3, 2019

Maybe I'm just dense, but I don't see any benefit of having multiple rulesets.

@carolinan
Copy link

I don't mind the idea or the naming, but these extra rules should not be a priority until "everything else" is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: input/decision needed meta Everything to do with the repo structure and organisation.
Projects
None yet
Development

No branches or pull requests

5 participants