You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While reviewing #705 (review), I noticed that in the code documentation, PHPCS specifies that there are two possible values for the type attribute of the <exclude-pattern> and <include-pattern> tags that can be used in a ruleset file: absolute and relative.
Is your feature request related to a problem?
While reviewing #705 (review), I noticed that in the code documentation, PHPCS specifies that there are two possible values for the
type
attribute of the<exclude-pattern>
and<include-pattern>
tags that can be used in a ruleset file:absolute
andrelative
.PHP_CodeSniffer/src/Ruleset.php
Lines 48 to 57 in 9c8f30f
PHP_CodeSniffer/src/Ruleset.php
Lines 59 to 68 in 9c8f30f
But the code does not validate that one of those values is passed and any value is accepted:
PHP_CodeSniffer/src/Ruleset.php
Line 1232 in 9c8f30f
PHP_CodeSniffer/src/Ruleset.php
Line 1258 in 9c8f30f
Adding the following to a ruleset.xml file, will add a exclude pattern (called ignore pattern in the code) with the type
InvalidValue
:Describe the solution you'd like
PHPCS should validate the values passed to the
type
attribute and warn users if an invalid value is passed.Additional context (optional)
The text was updated successfully, but these errors were encountered: