Open jrfnl opened 6 years ago
For the WPTheme-Required
, maybe WPTheme-Standard
?
Maybe I'm just dense, but I don't see any benefit of having multiple rulesets.
I don't mind the idea or the naming, but these extra rules should not be a priority until "everything else" is complete.
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 aWPTheme-Extra
rulesetWPCS has the
WordPress-Core
andWordPress-Extra
rulesets, withWordPress-Core
only containing the sniffs which are line with what's documented in the WP Core handbook andWordPress-Extra
containing additional best practices and sniffs which are candidates to go intoCore
, 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 theExtra
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 theRequired
andExtra
rulesetsWPTheme-Required
- directory with only a rulesetWPTheme-Extra
- directory with only a ruleset. Ruleset would includeWPTheme-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.