1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-24 07:42:39 +01:00

Tweak severity of pht() linter

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
This commit is contained in:
vrana 2012-09-12 10:17:59 -07:00
parent 7c0d99aac9
commit 64f35f0b83
4 changed files with 7 additions and 5 deletions

View 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/"

View 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,
));

View 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,

View file

@ -7,5 +7,5 @@ pht();
pht($a);
pht('%s', $a);
~~~~~~~~~~
warning:5:1
warning:7:1
disabled:5:1
disabled:7:1