Skip to content

Commit 7e8eb4c

Browse files
dmsnellsirreal
authored andcommitted
WPCS
1 parent eb99542 commit 7e8eb4c

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

phpcs.xml.dist

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@
224224
#############################################################################
225225
SELECTIVE EXCLUSIONS
226226
Exclude specific files for specific sniffs and/or exclude sub-groups in sniffs.
227-
227+
228228
These exclusions are listed ordered by alphabetic sniff name.
229229
#############################################################################
230230
-->
@@ -250,6 +250,15 @@
250250
<exclude-pattern>/wp-tests-config-sample\.php</exclude-pattern>
251251
</rule>
252252

253+
<!-- Exclude forbidding goto in the HTML Processor, which mimics algorithms that are written
254+
this way in the HTML specification, and these particular algorithms are complex and
255+
highly imperative. Avoiding the goto introduces a number of risks that could make it
256+
more difficult to maintain the relationship to the standard, lead to subtle differences
257+
in the parsing, and distance the code from its standard. -->
258+
<rule ref="Generic.PHP.DiscourageGoto.Found">
259+
<exclude-pattern>/wp-includes/html-api/class-wp-html-processor\.php</exclude-pattern>
260+
</rule>
261+
253262
<!-- Exclude sample config from modernization to prevent breaking CI workflows based on WP-CLI scaffold.
254263
See: https://core.trac.wordpress.org/ticket/48082#comment:16 -->
255264
<rule ref="Modernize.FunctionCalls.Dirname.FileConstant">

tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function data_single_tag_of_supported_elements() {
9090
'METER',
9191
'MULTICOL', // Deprecated
9292
'NAV',
93-
'NEXTID',// Deprecated
93+
'NEXTID', // Deprecated
9494
'OUTPUT',
9595
'P',
9696
'PICTURE',

0 commit comments

Comments
 (0)