[wp-trac] [WordPress Trac] #30153: Integrate PHP_CodeSniffer into build/test tools to enforce coding standards on new patches

WordPress Trac noreply at wordpress.org
Mon Jul 9 03:45:26 UTC 2018


#30153: Integrate PHP_CodeSniffer into build/test tools to enforce coding standards
on new patches
------------------------------+-------------------------------
 Reporter:  westonruter       |       Owner:  (none)
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  5.0
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  needs-patch       |     Focuses:  coding-standards
------------------------------+-------------------------------

Comment (by westonruter):

 @pento No, it was not merged. But there is an implementation of it in
 [https://github.com/xwp/wp-dev-lib/ wp-dev-lib] in its
 [https://github.com/xwp/wp-dev-
 lib/blob/d7d30385f58002abfd4deeb1362b58be580d25b6/check-diff.sh#L919-L939
 check-diff.sh] and accompanying diff tools.

 However, @jrf has wisely pointed out that it is unreliable to filter out
 errors that aren't related to the lines in a diff. That is, errors can
 slip through. For example, when applying to approach to JSHint, if a
 variable is removed but then its `var` remains then an error will slip
 through regarding an unused variable.

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


More information about the wp-trac mailing list