1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-10 00:42:40 +01:00

Improve error message from ArcanistXHPASTLinter::LINT_FORMATTED_STRING

Summary: Currently the error message from `ArcanistXHPASTLinter::LINT_FORMATTED_STRING` is slightly wrong, mentioning `xsprintf` instead of the actual `sprintf`-style function which was used. This diff changes the error message to be more correct.

Test Plan: Linted a file containing `sprintf('%s')` and saw a reasonable lint message.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12871
This commit is contained in:
Joshua Spence 2015-05-18 07:48:03 +10:00
parent 1df248cc2d
commit e3a556af9b

View file

@ -3450,7 +3450,7 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter {
$this->raiseLintAtNode(
$call,
self::LINT_FORMATTED_STRING,
$ex->getMessage());
str_replace('xsprintf', $name, $ex->getMessage()));
} catch (InvalidArgumentException $ex) {
// Ignore.
}