[buddypress-trac] [BuddyPress Trac] #7228: Add PHPCS

buddypress-trac noreply at wordpress.org
Mon Mar 8 18:21:48 UTC 2021

#7228: Add PHPCS
 Reporter:  DJPaul            |       Owner:  (none)
     Type:  enhancement       |      Status:  reopened
 Priority:  normal            |   Milestone:  8.0.0
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:                    |

Comment (by imath):

 I understand @johnjamesjacoby's concerns and I strongly agree with him
 when he says
 > and **patches** shouldn't be rejected only because of PHPCS issues

 We should always welcome new contributors, if a patch needs to be improved
 to comply with code standards, then I believe it's on us members of the
 team to make this happen.

 I believe we can make it an opportunity to welcome new contributors: if we
 look back in some suggested patches, some were only about applying some
 WPCS rules.

 I believe, we need to lead by example but do it in a nice way: only keep
 the good of the rules and always welcome contributors patches, we can try
 to encourage them to make it comply with WP/BP Code standards but we
 should never make it a blocker for contributors or make it an excuse for
 us to not review a patch.

 Let's take an example of how it can be useful: we agreed for Nouveau to
 introduce 2 informations into the PHP header's docblock of template packs:

  * Long description etc..
  * @since 3.0.0 (when it was introduced)
  * @version 7.0.0 (the last time it was edited)

 I believe if a rule would check this information is accurate it would help
 us not forget to update it (I often do 😬), and it would help BP advanced
 users to be aware they need to update their custom templates.

 This example is in favor of doing custom sniffs/ruleset. I believe we
 should be the closest to WP rules so that we can link to their
 documentation for the wide majority of rules.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7228#comment:18>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list