mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-29 17:00:58 +01:00
(stable) Promote 2017 Week 17
This commit is contained in:
commit
ada63de972
2 changed files with 16 additions and 5 deletions
|
@ -56,12 +56,14 @@ final class ArcanistPhutilXHPASTLinterStandard
|
|||
}
|
||||
|
||||
public function getLinterSeverityMap() {
|
||||
$advice = ArcanistLintSeverity::SEVERITY_ADVICE;
|
||||
$error = ArcanistLintSeverity::SEVERITY_ERROR;
|
||||
$advice = ArcanistLintSeverity::SEVERITY_ADVICE;
|
||||
$error = ArcanistLintSeverity::SEVERITY_ERROR;
|
||||
$warning = ArcanistLintSeverity::SEVERITY_WARNING;
|
||||
|
||||
return array(
|
||||
ArcanistTodoCommentXHPASTLinterRule::ID => $advice,
|
||||
ArcanistCommentSpacingXHPASTLinterRule::ID => $error,
|
||||
ArcanistTodoCommentXHPASTLinterRule::ID => $advice,
|
||||
ArcanistCommentSpacingXHPASTLinterRule::ID => $error,
|
||||
ArcanistRaggedClassTreeEdgeXHPASTLinterRule::ID => $warning,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -83,6 +83,7 @@ EOTEXT
|
|||
$display_name = 'F'.$id;
|
||||
$is_show = $this->show;
|
||||
$save_as = $this->saveAs;
|
||||
$path = null;
|
||||
|
||||
try {
|
||||
$file = $conduit->callMethodSynchronous(
|
||||
|
@ -186,7 +187,7 @@ EOTEXT
|
|||
throw new Exception(
|
||||
pht(
|
||||
'Got HTTP %d status response, expected HTTP 200.',
|
||||
$status));
|
||||
$status->getStatusCode()));
|
||||
}
|
||||
|
||||
if (strlen($data)) {
|
||||
|
@ -232,6 +233,14 @@ EOTEXT
|
|||
|
||||
return 0;
|
||||
} catch (Exception $ex) {
|
||||
|
||||
// If we created an empty file, clean it up.
|
||||
if (!$is_show) {
|
||||
if ($path !== null) {
|
||||
Filesystem::remove($path);
|
||||
}
|
||||
}
|
||||
|
||||
// If we fail for any reason, fall back to the older mechanism using
|
||||
// "file.info" and "file.download".
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue