Changeset View
Changeset View
Standalone View
Standalone View
arcanist/linter/ClangFormatLinter.php
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | public function getVersion() { | ||||
/* | /* | ||||
* FIXME: This is a hack to only allow for clang-format version 8.x. | * FIXME: This is a hack to only allow for clang-format version 8.x. | ||||
* The .arclint `version` field only allow to filter versions using `=`, | * The .arclint `version` field only allow to filter versions using `=`, | ||||
* `>`, `<`, `>=` or `<=`. There is no facility to define that the required | * `>`, `<`, `>=` or `<=`. There is no facility to define that the required | ||||
* version should be >= 8.0 and < 9.0. | * version should be >= 8.0 and < 9.0. | ||||
*/ | */ | ||||
if ($version[0] != '8') { | if ($version[0] != '8') { | ||||
throw new Exception(pht('Linter %s requires clang-format version 7.x. '. | throw new Exception(pht('Linter %s requires clang-format version 8.x. '. | ||||
'You have version %s.', | 'You have version %s.', | ||||
ClangFormatLinter::class, | ClangFormatLinter::class, | ||||
$version)); | $version)); | ||||
} | } | ||||
return $version; | return $version; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |