mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-24 15:52:40 +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:
parent
7c0d99aac9
commit
64f35f0b83
4 changed files with 7 additions and 5 deletions
|
@ -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/"
|
||||||
|
|
|
@ -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,
|
||||||
));
|
));
|
||||||
|
|
|
@ -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,
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue