Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14014326
D20532.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D20532.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D20532: Fix handling of empty line/column in linter tests
Attached
Detach File
Event Timeline
Log In to Comment