1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-28 01:32:41 +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", "project_id" : "arcanist",
"conduit_uri" : "https://secure.phabricator.com/", "conduit_uri" : "https://secure.phabricator.com/",
"lint_engine" : "ComprehensiveLintEngine", "lint.engine" : "PhutilLintEngine",
"unit_engine" : "PhutilUnitTestEngine", "unit.engine" : "PhutilUnitTestEngine",
"copyright_holder" : "Facebook, Inc.", "copyright_holder" : "Facebook, Inc.",
"phutil_libraries" : { "phutil_libraries" : {
"arcanist" : "src/" "arcanist" : "src/"

View file

@ -94,6 +94,8 @@ class PhutilLintEngine extends ArcanistLintEngine {
=> ArcanistLintSeverity::SEVERITY_ERROR, => ArcanistLintSeverity::SEVERITY_ERROR,
ArcanistXHPASTLinter::LINT_PHP_54_FEATURES ArcanistXHPASTLinter::LINT_PHP_54_FEATURES
=> ArcanistLintSeverity::SEVERITY_ERROR, => ArcanistLintSeverity::SEVERITY_ERROR,
ArcanistXHPASTLinter::LINT_PHT_WITH_DYNAMIC_STRING
=> ArcanistLintSeverity::SEVERITY_WARNING,
ArcanistXHPASTLinter::LINT_COMMENT_SPACING ArcanistXHPASTLinter::LINT_COMMENT_SPACING
=> ArcanistLintSeverity::SEVERITY_ERROR, => ArcanistLintSeverity::SEVERITY_ERROR,
)); ));

View file

@ -128,7 +128,7 @@ final class ArcanistXHPASTLinter extends ArcanistLinter {
self::LINT_IMPLICIT_FALLTHROUGH self::LINT_IMPLICIT_FALLTHROUGH
=> ArcanistLintSeverity::SEVERITY_WARNING, => ArcanistLintSeverity::SEVERITY_WARNING,
self::LINT_PHT_WITH_DYNAMIC_STRING self::LINT_PHT_WITH_DYNAMIC_STRING
=> ArcanistLintSeverity::SEVERITY_WARNING, => ArcanistLintSeverity::SEVERITY_DISABLED,
self::LINT_SLOWNESS self::LINT_SLOWNESS
=> ArcanistLintSeverity::SEVERITY_WARNING, => ArcanistLintSeverity::SEVERITY_WARNING,

View file

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