mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-10 23:01:04 +01:00
Show lint messages in deleted files on the left-hand side of the change
Summary: See PHI416. If you raise a lint message in a deleted file, we don't render any text on the right hand side so the message never displays. This is occasionally still legitimate/useful, e.g. to display a "don't delete this file" message. At least for now, show these messages on the left. Test Plan: Posted a lint message on a deleted file via `harbormaster.sendmessage`, viewed revision, saw file expand with synthetic inline for lint. Differential Revision: https://secure.phabricator.com/D19171
This commit is contained in:
parent
42e5b8a04b
commit
5844952153
1 changed files with 13 additions and 3 deletions
|
@ -390,10 +390,20 @@ final class DifferentialChangesetViewController extends DifferentialController {
|
|||
return array();
|
||||
}
|
||||
|
||||
$change_type = $changeset->getChangeType();
|
||||
if (DifferentialChangeType::isDeleteChangeType($change_type)) {
|
||||
// If this is a lint message on a deleted file, show it on the left
|
||||
// side of the UI because there are no source code lines on the right
|
||||
// side of the UI so inlines don't have anywhere to render. See PHI416.
|
||||
$is_new = 0;
|
||||
} else {
|
||||
$is_new = 1;
|
||||
}
|
||||
|
||||
$template = id(new DifferentialInlineComment())
|
||||
->setChangesetID($changeset->getID())
|
||||
->setIsNewFile(1)
|
||||
->setLineLength(0);
|
||||
->setChangesetID($changeset->getID())
|
||||
->setIsNewFile($is_new)
|
||||
->setLineLength(0);
|
||||
|
||||
$inlines = array();
|
||||
foreach ($messages as $message) {
|
||||
|
|
Loading…
Reference in a new issue