[wp-trac] [WordPress Trac] #41057: Update PHP codebase per WordPress PHP Coding Standards
WordPress Trac
noreply at wordpress.org
Tue Jun 20 04:33:15 UTC 2017
#41057: Update PHP codebase per WordPress PHP Coding Standards
----------------------------+-----------------------
Reporter: netweb | Owner: pento
Type: task (blessed) | Status: accepted
Priority: normal | Milestone: 4.9
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
----------------------------+-----------------------
Comment (by pento):
Thanks for your work on this so far, @jrf!
Would you mind posting your updates as new comments, rather than editing
comments? Comment edits aren't emailed to ticket subscribers, so I only
noticed your updates by chance.
> And just in case someone is now thinking "Cricky, PHPCS is really buggy,
shouldn't we use something else ?"... The majority of the fixes - I'd
wager > 95% - is correct. Using PHPCS on WP core is, however, in a way a
stress-test of PHPCS, we're really getting into all the nooks and
crannies, so I'm not surprised we're finding bugs.
Agreed, WordPress has a huge variety of code, so I'm not surprised that
we're running into edge cases, either.
Is there are definitive method for running PHPCS/WPCS with the various
PRs? Being fairly unfamiliar with both projects, it's a bit tricky to
figure out whether bugs are being caused by know or unknown issues.
Also, while I remember, another thing noticed - multibyte characters seem
to cause invalid PHP to be produced. If you remove `/tests/` from the
excluded locations, `tests/phpunit/tests/pomo/po.php` and
`tests/phpunit/tests/pomo/mo.php` will have curly braces immediately
following a multibyte string missing, after reformatting.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41057#comment:31>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list