[wp-trac] [WordPress Trac] #44366: Update PHPCS ruleset for WP Core and related Composer setup

WordPress Trac noreply at wordpress.org
Thu Jun 14 13:11:58 UTC 2018


#44366: Update PHPCS ruleset for WP Core and related Composer setup
------------------------------+-----------------------------
 Reporter:  jrf               |      Owner:  (none)
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  General           |    Version:  trunk
 Severity:  normal            |   Keywords:  has-patch
  Focuses:  coding-standards  |
------------------------------+-----------------------------
 This update the core native PHPCS ruleset

 `.gitignore`:
 * Add the typical filenames of overloaded PHPCS configs to `.gitignore`.

 Composer:
 * Use the `develop` (Packagist `dev-master`) version of WPCS as it
 contains lots of bugfixes.
 * Remove the PHPCS dependency. This is a dependency of WPCS, not of WP
 Core itself. This will also make sure that the PHPCS version used is
 always one which is supported by WPCS.
 * Refreshed the `composer.lock` file.

 PHPCS ruleset:
 * Comment out a reference to a sniff which doesn't exist in WPCS yet (for
 now).
 * Use the PHPCS 3.x `basepath` option to clean up the file paths PHPCS
 shows in the reports.
 * Use the PHPCS 3.x `parallel` option to enable parallel scanning whenever
 possible to speed up the scans.
 * Whitelist the `wp-includes/I18n.php` file from issues being reported by
 the `WordPress.WP.I18n` sniff.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44366>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list