1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-01 18:30:59 +01:00

Improved warning message when accepting diff with skipped lint or unit

Summary:
Some people find the current message stating "This diff has Lint/Unit Test
Problems" confusing if the unit tests or lint was skipped. This revision
clarifies those messages.

Test Plan:
Started to accept a revision with skipped lint and unit tests, and saw the new
message.

Reviewers: epriestley, btrahan, jungejason

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1738
This commit is contained in:
Nick Harper 2012-02-27 16:09:22 -08:00
parent 4c8f405fcc
commit 5042667b96

View file

@ -149,9 +149,15 @@ final class DifferentialAddCommentView extends AphrontView {
DifferentialLintStatus::LINT_FAIL => 'Lint Failure', DifferentialLintStatus::LINT_FAIL => 'Lint Failure',
DifferentialLintStatus::LINT_SKIP => 'Lint Skipped' DifferentialLintStatus::LINT_SKIP => 'Lint Skipped'
); );
$content = if ($diff->getLintStatus() == DifferentialLintStatus::LINT_SKIP) {
"<p>This diff has Lint Problems. Make sure you are OK with them ". $content =
"before you accept this diff.</p>"; "<p>This diff was created without running lint. Make sure you are ".
"OK with that before you accept this diff.</p>";
} else {
$content =
"<p>This diff has Lint Problems. Make sure you are OK with them ".
"before you accept this diff.</p>";
}
$lint_warning = $this->generateWarningView( $lint_warning = $this->generateWarningView(
$diff->getLintStatus(), $diff->getLintStatus(),
$titles, $titles,
@ -172,6 +178,10 @@ final class DifferentialAddCommentView extends AphrontView {
"<p>This diff has postponed unit tests. The results should be ". "<p>This diff has postponed unit tests. The results should be ".
"coming in soon. You should probably wait for them before accepting ". "coming in soon. You should probably wait for them before accepting ".
"this diff.</p>"; "this diff.</p>";
} else if ($diff->getUnitStatus() == DifferentialUnitStatus::UNIT_SKIP) {
$content =
"<p>Unit tests were skipped when this diff was created. Make sure ".
"you are OK with that before you accept this diff.</p>";
} else { } else {
$content = $content =
"<p>This diff has Unit Test Problems. Make sure you are OK with ". "<p>This diff has Unit Test Problems. Make sure you are OK with ".