From e33bd82c423b9c81761997afc19b307268a6a9c5 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 21 Feb 2013 16:44:34 -0800 Subject: [PATCH] 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 --- src/lint/linter/ArcanistPhutilXHPASTLinter.php | 3 +++ src/lint/linter/__tests__/phlxhp/xsprintf.lint-test | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 src/lint/linter/__tests__/phlxhp/xsprintf.lint-test diff --git a/src/lint/linter/ArcanistPhutilXHPASTLinter.php b/src/lint/linter/ArcanistPhutilXHPASTLinter.php index 56d76676..4ae868e1 100644 --- a/src/lint/linter/ArcanistPhutilXHPASTLinter.php +++ b/src/lint/linter/ArcanistPhutilXHPASTLinter.php @@ -102,6 +102,9 @@ final class ArcanistPhutilXHPASTLinter extends ArcanistBaseXHPASTLinter { 'pht' => 0, 'hsprintf' => 0, + 'jsprintf' => 0, + + 'hgsprintf' => 0, 'csprintf' => 0, 'vcsprintf' => 0, diff --git a/src/lint/linter/__tests__/phlxhp/xsprintf.lint-test b/src/lint/linter/__tests__/phlxhp/xsprintf.lint-test new file mode 100644 index 00000000..e33a24e6 --- /dev/null +++ b/src/lint/linter/__tests__/phlxhp/xsprintf.lint-test @@ -0,0 +1,13 @@ +