YahnisElsts / wp-update-server

A custom update API for WordPress plugins and themes. Intended to be used in conjunction with my plugin-update-checker library.
MIT License
821 stars 174 forks source link

How about implementing WordPress Code Standards? #107

Closed ddur closed 1 year ago

ddur commented 1 year ago

Running PHPCS with WPCS over code warns about code (or security) practices and of course makes repository compliant with WordPress coding rules/standards.

It is not that I especially like rules :grin: , but in addition to complying to standard they make code searching easier.

YahnisElsts commented 1 year ago

Edit: Oops, I was looking at the wrong repository. Disregard this comment. PHPCS has not been implemented yet.

ddur commented 1 year ago

Edit: Oops, I was looking at the wrong repository. Disregard this comment. PHPCS has not been implemented yet.

Hi Yahnis.

Would you accept PR with your PHP code reformatted to comply with WordPress Coding Standards? PHPCS is included and slightly modified in WPCS.

YahnisElsts commented 1 year ago

No need, I went through the PHPCS reports for this repository now, and fixed/silenced most things.

There are still warnings/errors in the external dependencies (excluded via phpcs.xml), but I'm not sure it's worth fixing those. You would probably have to rewrite the metadata parser entirely to make it compliant.

ddur commented 1 year ago

Thanks