Skip to content

Commit 330ab09

Browse files
* added support for windows by calling phpcs directly
1 parent 45eacdb commit 330ab09

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/runner.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@ function processDir($dirPath)
2121
}
2222

2323
$fileContent = file_get_contents($dirPath . $file);
24-
$snifferOutput = shell_exec(__DIR__ . '/../bin/php-code-validator "' . $dirPath . $file . '"');
24+
$snifferOutput = shell_exec(
25+
sprintf(
26+
"%s -w -p -s --standard=%s %s",
27+
escapeshellcmd(__DIR__ . '/../vendor/bin/phpcs'),
28+
escapeshellarg(__DIR__ . '/../ruleset.xml'),
29+
escapeshellarg($dirPath . $file)
30+
)
31+
);
2532

2633
// expectedPass
2734
if (preg_match('|//\s@expectedPass$|m', $fileContent)) {

0 commit comments

Comments
 (0)