mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-10 00:42:40 +01: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:
parent
76b54ce0a9
commit
617c2e46d6
1 changed files with 9 additions and 2 deletions
|
@ -25,8 +25,15 @@ final class ArcanistLintMessage extends Phobject {
|
|||
$message = new ArcanistLintMessage();
|
||||
|
||||
$message->setPath($dict['path']);
|
||||
|
||||
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']);
|
||||
|
|
Loading…
Reference in a new issue