Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13989067
D8993.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D8993.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D8993: Parse JSON as an associate array.
Attached
Detach File
Event Timeline
Log In to Comment