1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-20 00:49:11 +02:00

Make "line" and "char" strictly optional in ArcanistLintMessage

Summary: See PHI136. These are already optional on the server side in `HarbormasterBuildLintMessage`, and effectively mean "file-level issue", which is a bit niche but not unreasonable.

Test Plan: Checked that `HarbormasterBuildLintMessage` doesn't care if these keys exist, created this revision.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D18711
This commit is contained in:
epriestley 2017-10-17 14:20:38 -07:00
parent 76b54ce0a9
commit 617c2e46d6

View file

@ -25,8 +25,15 @@ final class ArcanistLintMessage extends Phobject {
$message = new ArcanistLintMessage();
$message->setPath($dict['path']);
$message->setLine($dict['line']);
$message->setChar($dict['char']);
if (isset($dict['line'])) {
$message->setLine($dict['line']);
}
if (isset($dict['char'])) {
$message->setChar($dict['char']);
}
$message->setCode($dict['code']);
$message->setSeverity($dict['severity']);
$message->setName($dict['name']);