1
0
Fork 0
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:
epriestley 2013-02-21 16:44:34 -08:00
parent 3e3ea378ed
commit e33bd82c42
2 changed files with 16 additions and 0 deletions

View file

@ -102,6 +102,9 @@ final class ArcanistPhutilXHPASTLinter extends ArcanistBaseXHPASTLinter {
'pht' => 0,
'hsprintf' => 0,
'jsprintf' => 0,
'hgsprintf' => 0,
'csprintf' => 0,
'vcsprintf' => 0,

View 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