Skip to content

Commit 4e9018c

Browse files
Allow hidden PHPCS configuration files
Modify file detection logic to check the existence of PHPCS configuration files named with a leading dot (as allowed by squizlabs/PHP_CodeSniffer#1566) in order to run PHPCS.
1 parent c4e4e8b commit 4e9018c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pretty

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ $commands = $commands[$task];
4848
$command = '';
4949

5050
// Detect which tool to run
51-
if (file_exists('phpcs.xml') || file_exists('phpcs.xml.dist')) {
51+
if (file_exists('.phpcs.xml') || file_exists('phpcs.xml') || file_exists('.phpcs.xml.dist') || file_exists('phpcs.xml.dist')) {
5252
echo "PHP CodeSniffer configuration file found, running CodeSniffer\n";
5353
$command = $commands['phpcs'];
5454
$program = explode(' ', $command, 1)[0];

0 commit comments

Comments
 (0)