mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-01-01 10:20: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() {
|
public function getLinterSeverityMap() {
|
||||||
$advice = ArcanistLintSeverity::SEVERITY_ADVICE;
|
$advice = ArcanistLintSeverity::SEVERITY_ADVICE;
|
||||||
$error = ArcanistLintSeverity::SEVERITY_ERROR;
|
$error = ArcanistLintSeverity::SEVERITY_ERROR;
|
||||||
|
$warning = ArcanistLintSeverity::SEVERITY_WARNING;
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
ArcanistTodoCommentXHPASTLinterRule::ID => $advice,
|
ArcanistTodoCommentXHPASTLinterRule::ID => $advice,
|
||||||
ArcanistCommentSpacingXHPASTLinterRule::ID => $error,
|
ArcanistCommentSpacingXHPASTLinterRule::ID => $error,
|
||||||
|
ArcanistRaggedClassTreeEdgeXHPASTLinterRule::ID => $warning,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,7 @@ EOTEXT
|
||||||
$display_name = 'F'.$id;
|
$display_name = 'F'.$id;
|
||||||
$is_show = $this->show;
|
$is_show = $this->show;
|
||||||
$save_as = $this->saveAs;
|
$save_as = $this->saveAs;
|
||||||
|
$path = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$file = $conduit->callMethodSynchronous(
|
$file = $conduit->callMethodSynchronous(
|
||||||
|
@ -186,7 +187,7 @@ EOTEXT
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
pht(
|
pht(
|
||||||
'Got HTTP %d status response, expected HTTP 200.',
|
'Got HTTP %d status response, expected HTTP 200.',
|
||||||
$status));
|
$status->getStatusCode()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($data)) {
|
if (strlen($data)) {
|
||||||
|
@ -232,6 +233,14 @@ EOTEXT
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
} catch (Exception $ex) {
|
} 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
|
// If we fail for any reason, fall back to the older mechanism using
|
||||||
// "file.info" and "file.download".
|
// "file.info" and "file.download".
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue