Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14395373
D10487.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D10487.diff
View Options
diff --git a/src/applications/differential/constants/DifferentialLintStatus.php b/src/applications/differential/constants/DifferentialLintStatus.php
--- a/src/applications/differential/constants/DifferentialLintStatus.php
+++ b/src/applications/differential/constants/DifferentialLintStatus.php
@@ -8,5 +8,6 @@
const LINT_FAIL = 3;
const LINT_SKIP = 4;
const LINT_POSTPONED = 5;
+ const LINT_AUTO_SKIP = 6;
}
diff --git a/src/applications/differential/constants/DifferentialUnitStatus.php b/src/applications/differential/constants/DifferentialUnitStatus.php
--- a/src/applications/differential/constants/DifferentialUnitStatus.php
+++ b/src/applications/differential/constants/DifferentialUnitStatus.php
@@ -8,5 +8,6 @@
const UNIT_FAIL = 3;
const UNIT_SKIP = 4;
const UNIT_POSTPONED = 5;
+ const UNIT_AUTO_SKIP = 6;
}
diff --git a/src/applications/differential/customfield/DifferentialLintField.php b/src/applications/differential/customfield/DifferentialLintField.php
--- a/src/applications/differential/customfield/DifferentialLintField.php
+++ b/src/applications/differential/customfield/DifferentialLintField.php
@@ -239,6 +239,9 @@
if ($status < DifferentialLintStatus::LINT_WARN) {
return array();
}
+ if ($status == DifferentialLintStatus::LINT_AUTO_SKIP) {
+ return array();
+ }
$warnings = array();
if ($status == DifferentialLintStatus::LINT_SKIP) {
diff --git a/src/applications/differential/customfield/DifferentialUnitField.php b/src/applications/differential/customfield/DifferentialUnitField.php
--- a/src/applications/differential/customfield/DifferentialUnitField.php
+++ b/src/applications/differential/customfield/DifferentialUnitField.php
@@ -209,6 +209,8 @@
$warnings = array();
if ($status < DifferentialUnitStatus::UNIT_WARN) {
// Don't show any warnings.
+ } else if ($status == DifferentialUnitStatus::UNIT_AUTO_SKIP) {
+ // Don't show any warnings.
} else if ($status == DifferentialUnitStatus::UNIT_POSTPONED) {
$warnings[] = pht(
'Background tests have not finished executing on these changes.');
diff --git a/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php b/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php
--- a/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php
+++ b/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php
@@ -313,6 +313,7 @@
DifferentialLintStatus::LINT_WARN => self::STAR_WARN,
DifferentialLintStatus::LINT_FAIL => self::STAR_FAIL,
DifferentialLintStatus::LINT_SKIP => self::STAR_SKIP,
+ DifferentialLintStatus::LINT_AUTO_SKIP => self::STAR_SKIP,
DifferentialLintStatus::LINT_POSTPONED => self::STAR_SKIP
);
@@ -328,6 +329,7 @@
DifferentialUnitStatus::UNIT_WARN => self::STAR_WARN,
DifferentialUnitStatus::UNIT_FAIL => self::STAR_FAIL,
DifferentialUnitStatus::UNIT_SKIP => self::STAR_SKIP,
+ DifferentialUnitStatus::UNIT_AUTO_SKIP => self::STAR_SKIP,
DifferentialUnitStatus::UNIT_POSTPONED => self::STAR_SKIP,
);
@@ -339,17 +341,19 @@
public static function getDiffLintMessage(DifferentialDiff $diff) {
switch ($diff->getLintStatus()) {
case DifferentialLintStatus::LINT_NONE:
- return 'No Linters Available';
+ return pht('No Linters Available');
case DifferentialLintStatus::LINT_OKAY:
- return 'Lint OK';
+ return pht('Lint OK');
case DifferentialLintStatus::LINT_WARN:
- return 'Lint Warnings';
+ return pht('Lint Warnings');
case DifferentialLintStatus::LINT_FAIL:
- return 'Lint Errors';
+ return pht('Lint Errors');
case DifferentialLintStatus::LINT_SKIP:
- return 'Lint Skipped';
+ return pht('Lint Skipped');
+ case DifferentialLintStatus::LINT_AUTO_SKIP:
+ return pht('Automatic diff as part of commit; lint not applicable.');
case DifferentialLintStatus::LINT_POSTPONED:
- return 'Lint Postponed';
+ return pht('Lint Postponed');
}
return '???';
}
@@ -357,17 +361,20 @@
public static function getDiffUnitMessage(DifferentialDiff $diff) {
switch ($diff->getUnitStatus()) {
case DifferentialUnitStatus::UNIT_NONE:
- return 'No Unit Test Coverage';
+ return pht('No Unit Test Coverage');
case DifferentialUnitStatus::UNIT_OKAY:
- return 'Unit Tests OK';
+ return pht('Unit Tests OK');
case DifferentialUnitStatus::UNIT_WARN:
- return 'Unit Test Warnings';
+ return pht('Unit Test Warnings');
case DifferentialUnitStatus::UNIT_FAIL:
- return 'Unit Test Errors';
+ return pht('Unit Test Errors');
case DifferentialUnitStatus::UNIT_SKIP:
- return 'Unit Tests Skipped';
+ return pht('Unit Tests Skipped');
+ case DifferentialUnitStatus::UNIT_AUTO_SKIP:
+ return pht(
+ 'Automatic diff as part of commit; unit tests not applicable.');
case DifferentialUnitStatus::UNIT_POSTPONED:
- return 'Unit Tests Postponed';
+ return pht('Unit Tests Postponed');
}
return '???';
}
diff --git a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php
--- a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php
+++ b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php
@@ -261,8 +261,8 @@
->setAuthorPHID($actor_phid)
->setCreationMethod('commit')
->setSourceControlSystem($this->repository->getVersionControlSystem())
- ->setLintStatus(DifferentialLintStatus::LINT_SKIP)
- ->setUnitStatus(DifferentialUnitStatus::UNIT_SKIP)
+ ->setLintStatus(DifferentialLintStatus::LINT_AUTO_SKIP)
+ ->setUnitStatus(DifferentialUnitStatus::UNIT_AUTO_SKIP)
->setDateCreated($this->commit->getEpoch())
->setDescription(
'Commit r'.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 4:22 AM (14 h, 5 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6919934
Default Alt Text
D10487.diff (6 KB)
Attached To
Mode
D10487: Differential - label unit / lint results from the commit diff as not applicable
Attached
Detach File
Event Timeline
Log In to Comment