[wp-trac] [WordPress Trac] #57426: Coding Standards: mark warnings that trigger CI failures as errors.

WordPress Trac noreply at wordpress.org
Fri Jan 6 02:35:05 UTC 2023


#57426: Coding Standards: mark warnings that trigger CI failures as errors.
--------------------------------------+-------------------------------
 Reporter:  peterwilsoncc             |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Build/Test Tools          |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  coding-standards
--------------------------------------+-------------------------------

Comment (by peterwilsoncc):

 @jrf I've attached some images in the hope they'll be able to make it
 clearer.

 If it is possible, I'd like to increase the severity of all coding
 standards failures in the test directory to `error` to match the behavior
 of the CI -- warnings cause the CI to error. Per [attachment:"tests-
 alignment-as-error.2.png"]

 I use VS Code with PHPCS set up via one extension or another. The default
 config is to display errors in the editor window, warnings are suppressed
 per [attachment:"tests-alignment-as-warning.png"].

 While I use a custom config ([attachment:"tests-alignment-as-warning-with-
 custom-config.png"]) to show warnings, they are quite understated with my
 extension so easily missed. However, for contributors not aware of the
 need to check for warnings nothing will show.

 Reading through the annotated phpcs.xml file after posting this ticket, I
 am not sure it's possible so I'm happy enough if this ends up either a
 wontfix or a maybe later.

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


More information about the wp-trac mailing list