Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/ArcanistPuppetLintLinter.php
Show All 32 Lines | final class ArcanistPuppetLintLinter extends ArcanistExternalLinter { | ||||
public function getDefaultBinary() { | public function getDefaultBinary() { | ||||
return 'puppet-lint'; | return 'puppet-lint'; | ||||
} | } | ||||
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 = '/^puppet-lint (?P<version>\d+\.\d+\.\d+)$/'; | $regex = '/^puppet-lint (?P<version>\d+\.\d+\.\d+)\s*$/'; | ||||
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 90 Lines • Show Last 20 Lines |