Page MenuHomePhabricator

D20532.diff
No OneTemporary

D20532.diff

diff --git a/src/lint/linter/__tests__/ArcanistLinterTestCase.php b/src/lint/linter/__tests__/ArcanistLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistLinterTestCase.php
@@ -190,23 +190,28 @@
$line = idx($parts, 1);
$char = idx($parts, 2);
$code = idx($parts, 3);
+ $name = idx($parts, 4);
- if ($severity !== null) {
+ if (strlen($severity)) {
$message->setSeverity($severity);
}
- if ($line !== null) {
+ if (strlen($line)) {
$message->setLine($line);
}
- if ($char !== null) {
+ if (strlen($char)) {
$message->setChar($char);
}
- if ($code !== null) {
+ if (strlen($code)) {
$message->setCode($code);
}
+ if (strlen($name)) {
+ $message->setName($name);
+ }
+
$expected_results->addMessage($message);
}
@@ -246,6 +251,13 @@
continue;
}
+ if (!self::compareLintMessageProperty(
+ $expected_message->getName(),
+ $actual_message->getName())) {
+
+ continue;
+ }
+
$found = true;
unset($surprising[$ii]);
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/variable-variable/variable-variables.lint-test b/src/lint/linter/xhpast/rules/__tests__/variable-variable/variable-variables.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/variable-variable/variable-variables.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/variable-variable/variable-variables.lint-test
@@ -3,4 +3,4 @@
$$foo;
$obj->$bar; // okay
~~~~~~~~~~
-error:3:1:XHP3:Use of Variable
+error:3:1:XHP3:Use of Variable Variable

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 4, 1:57 AM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6738879
Default Alt Text
D20532.diff (1 KB)

Event Timeline