This seems to be excluding all files that end with settings.php, as the point (.) charecter seems to be understood as in regex, meaning "any character".
This rule should ideally be able to skipsettings.local.php or local.settings.php but pass theme-settings.php.
For this, the point character needs to be escaped and a new rule should be added:
I propose to change the rules as follow:
<!-- Will exclude any settings.php -->
<exclude-pattern>*/settings.php</exclude-pattern>
<!-- Will exclude anything that ends with *.settings.php, point is escaped -->
<exclude-pattern>*/*\.settings.php</exclude-pattern>
<!-- Will exclude anything that follows the pattern settings.ANYTHING.php -->
<exclude-pattern>*/settings\.*\.php</exclude-pattern>
I've realized that running
phpqa
resulted on a number of errors that didn't appear when runningphpcs
on its own.This was happening because
phpcs
was skipping mytheme-settings.php
files that sit on Drupal themes, whereasphpqa
was not.I traced the origin to this pattern on
phpcs.xml.dist
:<exclude-pattern>*/.settings.php</exclude-pattern>
This seems to be excluding all files that end with settings.php, as the point (.) charecter seems to be understood as in regex, meaning "any character".
This rule should ideally be able to skip
settings.local.php
orlocal.settings.php
but pass theme-settings.php.For this, the point character needs to be escaped and a new rule should be added:
I propose to change the rules as follow: