Page MenuHomePhabricator

D8993.diff
No OneTemporary

D8993.diff

diff --git a/src/lint/linter/ArcanistJSHintLinter.php b/src/lint/linter/ArcanistJSHintLinter.php
--- a/src/lint/linter/ArcanistJSHintLinter.php
+++ b/src/lint/linter/ArcanistJSHintLinter.php
@@ -84,7 +84,7 @@
}
protected function parseLinterOutput($path, $err, $stdout, $stderr) {
- $errors = json_decode($stdout);
+ $errors = json_decode($stdout, true);
if (!is_array($errors)) {
// Something went wrong and we can't decode the output. Exit abnormally.
@@ -98,13 +98,13 @@
foreach ($errors as $err) {
$message = new ArcanistLintMessage();
$message->setPath($path);
- $message->setLine($err->line);
- $message->setChar($err->col);
- $message->setCode($err->code);
- $message->setName('JSHint'.$err->code);
- $message->setDescription($err->reason);
- $message->setSeverity($this->getLintMessageSeverity($err->code));
- $message->setOriginalText($err->evidence);
+ $message->setLine(idx($err, 'line'));
+ $message->setChar(idx($err, 'col'));
+ $message->setCode(idx($err, 'code'));
+ $message->setName('JSHint'.idx($err, 'code'));
+ $message->setDescription(idx($err, 'reason'));
+ $message->setSeverity($this->getLintMessageSeverity(idx($err, 'code')));
+ $message->setOriginalText(idx($err, 'evidence'));
$messages[] = $message;
}

File Metadata

Mime Type
text/plain
Expires
Tue, Oct 22, 5:53 PM (3 w, 7 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6727601
Default Alt Text
D8993.diff (1 KB)

Event Timeline