]> khamidou — GitHub mirrors - arcanist.git/commit
Add a linter rule to detect mismatched parameters for formatted strings
authorJoshua Spence <josh@joshuaspence.com>
Tue, 10 Feb 2015 07:40:15 +0000 (18:40 +1100)
committerJoshua Spence <josh@joshuaspence.com>
Tue, 10 Feb 2015 07:43:03 +0000 (18:43 +1100)
commitd8ba7e6f719f621ae485c13ddc86d2d08040555e
tree51dac9b315341f1829d7ae88cbb467911fb39183
parentb32cce79b2c78da2d3c666ed37ba9be5bb7ddb01
Add a linter rule to detect mismatched parameters for formatted strings

Summary: Fixes T7046. Adds a linter rule to detect mismatched parameters for formatted strings. Originally I had considered putting this rule in `ArcanistPhutilXHPASTLinter`, but I later decided to move it to `ArcanistXHPASTLinter` as I think that it is general enough to be more widely useful.

Test Plan: This seems to work but needs some polish.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T7046

Differential Revision: https://secure.phabricator.com/D11661
src/lint/linter/ArcanistXHPASTLinter.php
src/lint/linter/__tests__/xhpast/formatted-string.lint-test [new file with mode: 0644]