]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Tweak severity of pht() linter
authorvrana <jakubv@fb.com>
Wed, 12 Sep 2012 17:17:59 +0000 (10:17 -0700)
committervrana <jakubv@fb.com>
Wed, 12 Sep 2012 17:29:37 +0000 (10:29 -0700)
Summary:
`pht()` can be some random function.
Better solution would be to separate this linter to its own class but it would be slower.

Also use `PhutilLintEngine` as `lint.engine`.

Test Plan:
  $ arc lint # on file with pht($a)

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3480

.arcconfig
src/lint/engine/PhutilLintEngine.php
src/lint/linter/ArcanistXHPASTLinter.php
src/lint/linter/__tests__/xhpast/pht.lint-test

index a2748677e447e21e8769a6ffa7b5c4bc2a999d60..5c31439a13a1684bf26336f4dca232fa43e8123d 100644 (file)
@@ -1,8 +1,8 @@
 {
   "project_id" : "arcanist",
   "conduit_uri" : "https://secure.phabricator.com/",
-  "lint_engine" : "ComprehensiveLintEngine",
-  "unit_engine" : "PhutilUnitTestEngine",
+  "lint.engine" : "PhutilLintEngine",
+  "unit.engine" : "PhutilUnitTestEngine",
   "copyright_holder" : "Facebook, Inc.",
   "phutil_libraries" : {
     "arcanist" : "src/"
index d17429782dddf60a18d847904d2ce854885dc8fe..b4e099fedec44c0ba65b253f5ac0845654561e5d 100644 (file)
@@ -94,6 +94,8 @@ class PhutilLintEngine extends ArcanistLintEngine {
           => ArcanistLintSeverity::SEVERITY_ERROR,
         ArcanistXHPASTLinter::LINT_PHP_54_FEATURES
           => ArcanistLintSeverity::SEVERITY_ERROR,
+        ArcanistXHPASTLinter::LINT_PHT_WITH_DYNAMIC_STRING
+          => ArcanistLintSeverity::SEVERITY_WARNING,
         ArcanistXHPASTLinter::LINT_COMMENT_SPACING
           => ArcanistLintSeverity::SEVERITY_ERROR,
       ));
index aff6f290ead5ddb9a671b58dac8966afd08ef759..07b6bc2eecfd72416e850e8fc66e58fa9cea2ca6 100644 (file)
@@ -128,7 +128,7 @@ final class ArcanistXHPASTLinter extends ArcanistLinter {
       self::LINT_IMPLICIT_FALLTHROUGH
         => ArcanistLintSeverity::SEVERITY_WARNING,
       self::LINT_PHT_WITH_DYNAMIC_STRING
-        => ArcanistLintSeverity::SEVERITY_WARNING,
+        => ArcanistLintSeverity::SEVERITY_DISABLED,
       self::LINT_SLOWNESS
         => ArcanistLintSeverity::SEVERITY_WARNING,
 
index 69b25a44a310610eac51695fb69f249dd5452c78..b9b1c711eb10793bd5122a1703786c9b558ff887 100644 (file)
@@ -7,5 +7,5 @@ pht();
 pht($a);
 pht('%s', $a);
 ~~~~~~~~~~
-warning:5:1
-warning:7:1
+disabled:5:1
+disabled:7:1