Using arcanist on git commit 59640f7eae3f7c0a352c18e784fb55acb7967991, the following error can be seen:
$ bin/arc unit --everything --no-coverage
FAIL ArcanistPhpcsLinterTestCase::testVersion Assertion failed, expected 'true' (at ArcanistExternalLinterTestCase.php:10): Failed to parse version from command. ACTUAL VALUE false
I am using PHP_CodeSniffer 1.5.0RC4, so it seems that regexp in src/lint/linter/ArcanistPhpcsLinter.php does not match
- $ phpcs --version
- PHP_CodeSniffer version 1.5.0RC4 (beta) by Squiz (http://www.squiz.net)
Here is a quick and dirty patch:
diff --git a/src/lint/linter/ArcanistPhpcsLinter.php b/src/lint/linter/ArcanistPhpcsLinter.php index 8475c55..5364ec3 100644 --- a/src/lint/linter/ArcanistPhpcsLinter.php +++ b/src/lint/linter/ArcanistPhpcsLinter.php @@ -88,7 +88,7 @@ final class ArcanistPhpcsLinter extends ArcanistExternalLinter { list($stdout) = execx('%C --version', $this->getExecutableCommand()); $matches = array(); - $regex = '/^PHP_CodeSniffer version (?P<version>\d+\.\d+\.\d+)\b/'; + $regex = '/^PHP_CodeSniffer version (?P<version>\d+\.\d+\.\d+)(RC\d)?\b/'; if (preg_match($regex, $stdout, $matches)) { return $matches['version']; } else {
List of all release, beta, and alpha versions:
http://pear.php.net/package/PHP_CodeSniffer/download