Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/ArcanistHLintLinter.php
Show All 31 Lines | final class ArcanistHLintLinter extends ArcanistExternalLinter { | ||||
public function getInstallInstructions() { | public function getInstallInstructions() { | ||||
return pht('Install hlint with `%s`.', 'cabal install hlint'); | return pht('Install hlint with `%s`.', 'cabal install hlint'); | ||||
} | } | ||||
protected function getMandatoryFlags() { | protected function getMandatoryFlags() { | ||||
return array('--json'); | return array('--json'); | ||||
} | } | ||||
public function getVersion() { | protected function parseVersionOutput($err, $stdout, $stderr) { | ||||
list($stdout, $stderr) = execx( | |||||
'%C --version', $this->getExecutableCommand()); | |||||
$matches = null; | $matches = null; | ||||
if (preg_match('@HLint v(.*),@', $stdout, $matches)) { | if (preg_match('@HLint v(.*),@', $stdout, $matches)) { | ||||
return $matches[1]; | return $matches[1]; | ||||
} | } | ||||
return null; | return null; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |