Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/ArcanistFlake8Linter.php
Show All 27 Lines | final class ArcanistFlake8Linter extends ArcanistExternalLinter { | ||||
public function getLinterConfigurationName() { | public function getLinterConfigurationName() { | ||||
return 'flake8'; | return 'flake8'; | ||||
} | } | ||||
public function getDefaultBinary() { | public function getDefaultBinary() { | ||||
return 'flake8'; | return 'flake8'; | ||||
} | } | ||||
public function getVersion() { | protected function parseVersionOutput($err, $stdout, $stderr) { | ||||
list($stdout) = execx('%C --version', $this->getExecutableCommand()); | |||||
$matches = array(); | $matches = array(); | ||||
if (preg_match('/^(?P<version>\d+\.\d+(?:\.\d+)?)\b/', $stdout, $matches)) { | if (preg_match('/^(?P<version>\d+\.\d+(?:\.\d+)?)\b/', $stdout, $matches)) { | ||||
return $matches['version']; | return $matches['version']; | ||||
} else { | } else { | ||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |