]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Don't issue lint about strangely named classes just because they have some
authorepriestley <epriestley@phabricator.com>
Wed, 26 Jan 2011 15:03:52 +0000 (07:03 -0800)
committerepriestley <epriestley@phabricator.com>
Wed, 26 Jan 2011 15:03:52 +0000 (07:03 -0800)
word character in them.

src/lint/linter/xhpast/ArcanistXHPASTLinter.php

index 960eea8a1ff134bfb3488420e724b5ac528ace51..38ed96f7ae1e2888ebdf8633be1f71249f5be5f9 100644 (file)
@@ -904,8 +904,8 @@ class ArcanistXHPASTLinter extends ArcanistLinter {
     $decl_name = $declaration->getChildByIndex(1);
     $decl_string = $decl_name->getConcreteString();
 
-    //Exclude strangely named classes.
-    if (!preg_match('/\w+/', $decl_string)) {
+    // Exclude strangely named classes, e.g. XHP tags.
+    if (!preg_match('/^\w+$/', $decl_string)) {
       return;
     }