getDiffProperty('arc:lint-excuse'); $excuse = phutil_escape_html($excuse); $excuse = nl2br($excuse); $excuse_markup = ''; if (strlen($excuse)) { $excuse_markup = '

Explanation for failure(s):

'. ''.$excuse.''; } return $excuse_markup; } public function renderValueForRevisionView() { $diff = $this->getDiff(); $path_changesets = mpull($diff->loadChangesets(), 'getId', 'getFilename'); $lstar = DifferentialRevisionUpdateHistoryView::renderDiffLintStar($diff); $lmsg = DifferentialRevisionUpdateHistoryView::getDiffLintMessage($diff); $ldata = $this->getDiffProperty('arc:lint'); $ltail = null; if ($ldata) { $ldata = igroup($ldata, 'path'); $lint_messages = array(); foreach ($ldata as $path => $messages) { $message_markup = array(); foreach ($messages as $message) { $path = idx($message, 'path'); $line = idx($message, 'line'); $code = idx($message, 'code'); $severity = idx($message, 'severity'); $name = idx($message, 'name'); $description = idx($message, 'description'); $line_link = phutil_escape_html($line); if (isset($path_changesets[$path])) { // TODO: Create standalone links for large diffs. Logic is in // DifferentialDiffTableOfContentsView::renderChangesetLink(). $line_link = phutil_render_tag( 'a', array( 'href' => '#C'.$path_changesets[$path].'NL'.$line, ), $line_link); } $message_markup[] = hsprintf( '
  • '. '%s (%s) %s '. 'at line '.$line_link. '

    %s

    '. '
  • ', $severity, ucwords($severity), $code, $name, $description); } $lint_messages[] = '
  • '. 'Lint for '.phutil_escape_html($path).''. ''. '
  • '; } $lexcuse = $this->getLintExcuse(); $ltail = '
    '. $lexcuse. ''. '
    '; } return $lstar.' '.$lmsg.$ltail; } }