Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15386013
D15819.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
888 B
Referenced Files
None
Subscribers
None
D15819.diff
View Options
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistXHPASTLinterRuleTestCase.php
@@ -8,8 +8,19 @@
extends ArcanistLinterTestCase {
final protected function getLinter() {
+ // Always include this rule so we get good messages if a test includes
+ // a syntax error. No normal test should contain syntax errors.
+ $syntax_rule = new ArcanistSyntaxErrorXHPASTLinterRule();
+
+ $test_rule = $this->getLinterRule();
+
+ $rules = array(
+ $syntax_rule,
+ $test_rule,
+ );
+
return id(new ArcanistXHPASTLinter())
- ->setRules(array($this->getLinterRule()));
+ ->setRules($rules);
}
/**
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 15, 11:51 PM (2 w, 23 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7704534
Default Alt Text
D15819.diff (888 B)
Attached To
Mode
D15819: When running XHPAST unit tests, include the "syntax error" lint rule
Attached
Detach File
Event Timeline
Log In to Comment