[wp-trac] [WordPress Trac] #43150: Update Emoji build step to follow WP Coding Standards.

WordPress Trac noreply at wordpress.org
Wed Jan 24 23:15:00 UTC 2018


#43150: Update Emoji build step to follow WP Coding Standards.
------------------------------+-------------------------------
 Reporter:  peterwilsoncc     |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  5.0
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |     Focuses:  coding-standards
------------------------------+-------------------------------

Comment (by jrf):

 @netweb FYI, you can combine several disables in one command, so the
 comment block above the arrays could look like this:

 {{{#!php
 <?php
         /*
          * Don't format the array across 4000 lines.
          * phpcs:disable
 WordPress.Arrays.ArrayDeclarationSpacing.ArrayItemNoNewLine,WordPress.Arrays.CommaAfterArrayItem.NoSpaceAfterComma
          *
          * N.B.: Do not remove the START/END comments - they're used to
 find where to insert the arrays.
          */
 }}}

 As a side-note: as this is a non-keyed array, as far as I can see, WPCS
 wouldn't be throwing the
 `WordPress.Arrays.ArrayDeclarationSpacing.ArrayItemNoNewLine` error if the
 array was passed like `array(....)` (no new line after opening bracket or
 before closing bracket).
 The line is going to be ridiculously long anyway, so why have those two
 new lines ?

 Similarly, as the line is so long, why not have the comma's after each
 array item ?

 Having said that, you may not need to use the `phpcs:disable` comments at
 all to still comply with the standards.

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


More information about the wp-trac mailing list