mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 14:52:40 +01:00
Add hgsprintf() and jsprintf() to dynamic string lint warning
Summary: Soon all functions will accept only static parameters! glorious! Test Plan: Added a couple tests. Reviewers: vrana Reviewed By: vrana CC: aran Differential Revision: https://secure.phabricator.com/D4811
This commit is contained in:
parent
3e3ea378ed
commit
e33bd82c42
2 changed files with 16 additions and 0 deletions
|
@ -102,6 +102,9 @@ final class ArcanistPhutilXHPASTLinter extends ArcanistBaseXHPASTLinter {
|
||||||
'pht' => 0,
|
'pht' => 0,
|
||||||
|
|
||||||
'hsprintf' => 0,
|
'hsprintf' => 0,
|
||||||
|
'jsprintf' => 0,
|
||||||
|
|
||||||
|
'hgsprintf' => 0,
|
||||||
|
|
||||||
'csprintf' => 0,
|
'csprintf' => 0,
|
||||||
'vcsprintf' => 0,
|
'vcsprintf' => 0,
|
||||||
|
|
13
src/lint/linter/__tests__/phlxhp/xsprintf.lint-test
Normal file
13
src/lint/linter/__tests__/phlxhp/xsprintf.lint-test
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
csprintf('x');
|
||||||
|
csprintf($x);
|
||||||
|
|
||||||
|
qsprintf();
|
||||||
|
qsprintf('x');
|
||||||
|
qsprintf('x', 'y');
|
||||||
|
qsprintf('x', $y);
|
||||||
|
|
||||||
|
~~~~~~~~~~
|
||||||
|
warning:4:1
|
||||||
|
warning:9:1
|
Loading…
Reference in a new issue