Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/ArcanistPyLintLinter.php
Show All 32 Lines | final class ArcanistPyLintLinter extends ArcanistExternalLinter { | ||||
public function getDefaultBinary() { | public function getDefaultBinary() { | ||||
return 'pylint'; | return 'pylint'; | ||||
} | } | ||||
public function getVersion() { | public function getVersion() { | ||||
list($stdout) = execx('%C --version', $this->getExecutableCommand()); | list($stdout) = execx('%C --version', $this->getExecutableCommand()); | ||||
$matches = array(); | $matches = array(); | ||||
$regex = '/^pylint (?P<version>\d+\.\d+\.\d+),/'; | $regex = '/^pylint (?P<version>\d+\.\d+\.\d+)/'; | ||||
if (preg_match($regex, $stdout, $matches)) { | if (preg_match($regex, $stdout, $matches)) { | ||||
return $matches['version']; | return $matches['version']; | ||||
} else { | } else { | ||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
public function getInstallInstructions() { | public function getInstallInstructions() { | ||||
▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines |