Implement a coding standard

WordPress has their own php coding standard for core. Although far from all code in core actually follows the standard.
I would love for ClassicPress to follow industry standard PSR-2.


Read-only archive: Issues · ClassicPress/ClassicPress · GitHub

Author: Joi Glifberg

Vote count: 17

Status: Completed


Comments

1 Like

PSR-anything includes standards that aren’t security related and as a matter of fact wpcs is using partially psr2 rules.

A recent poll has shown folks are worried about their freedom if we enforce any standard really that isn’t about pure security

As much I’d like a standard we should stick to wpcs in core, and “security only” in plugins + themes
This work (for plugins and themes) is underway now

I think this can be closed therefore

1 Like

@viktor actually we do now have a coding standard for Plugins/Themes approval, and the core is anyway following coding WPCS standard (mostly) and a number of other standards which are way more advanced than PSR_x standards.

We should either close or mark as done I think, so folks do not waste votes on it.

1 Like

One reservation I have about closing this petition right now is the original intent. What you described is basically what the petitioner described is the problem:

WordPress has their own php coding standard for core. Although far from all code in core actually follows the standard.

So the petition asks for one standard across all core files.

There is a branch for the big PHP coding standards changeset. The build does run the coding standard checks, but a lot of them fail until that changeset gets merged.

WP added a JS coding standard, but hasn’t made all the existing JS match it. I don’t think having the same standard for PHP and JS is optimal, or what the petition is asking for.
I think the petition should be closed.

2 Likes

I also think this petition should be closed. @MattyRob has already got the ball rolling on this.

Closing.

This topic was automatically closed after 3 days. New replies are no longer allowed.