[wp-trac] [WordPress Trac] #44600: Update WPCS to 1.0.0, and enforce coding standards

WordPress Trac noreply at wordpress.org
Thu Aug 16 06:26:21 UTC 2018


#44600: Update WPCS to 1.0.0, and enforce coding standards
------------------------------+-------------------------------
 Reporter:  pento             |       Owner:  pento
     Type:  task (blessed)    |      Status:  assigned
 Priority:  normal            |   Milestone:  5.0
Component:  Build/Test Tools  |     Version:  trunk
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:  coding-standards
------------------------------+-------------------------------

Comment (by jrf):

 @pento

 **Re: patch `44600.2.diff`**

 * I can understand fixing WPCS to a certain version, though as WPCS will
 be using semantic versioning, I think `~1.0.0` can safely be used instead
 of `1.0.0` as - if there will be a 1.0.x release, it will only contain bug
 fixes. New sniffs will not be introduced in patch releases, only in
 minors/majors.
 * I don't understand why the DealerDirect Composer should be fixed to a
 certain version. This is a plugin to handle setting the PHPCS
 `installed_paths`, so it should be fine to always use the latest version
 available.
 * `PEAR.Functions.FunctionCallSignature` config: The `requiredSpaces`
 properties are already set to `1` in the `WordPress-Core` WPCS ruleset, so
 you don't need to set them in the custom ruleset.
 * As for the `allowMultipleArguments` property for that same sniff, I have
 two questions:
     - Should that configuration be set in the custom ruleset or in the
 `WordPress-Core` ruleset ?
     - And is that configuration only needed for correctly *fixing* things
 or should the related error also be thrown when running `phpcs` ?


 **Re: fixing the non-autofixable issues:**
 * [https://github.com/WordPress-Coding-Standards/WordPress-Coding-
 Standards/pull/1450 WPCS PR 1450] takes care of 119 issues which could be
 regarded as false positives.
 * [https://github.com/squizlabs/PHP_CodeSniffer/pull/2121 PHPCS PR 2121]
 which has been merged and will be included in the PHPCS 3.3.2 release,
 takes care of another 24 false positives.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44600#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list