]> khamidou — GitHub mirrors - arcanist.git/commit
Add a linter rule for `*val` functions
authorJoshua Spence <josh@freelancer.com>
Sun, 29 Nov 2015 20:32:43 +0000 (07:32 +1100)
committerJoshua Spence <josh@freelancer.com>
Sun, 29 Nov 2015 20:37:07 +0000 (07:37 +1100)
commit578f540a92b1b78ca70b458244e39ea65f0c0ea8
tree7f91a3759df0d82288647ce5a198ebaf2fae95a2
parent4f1141d0c59be24268a45edb0cd25f1d27f31674
Add a linter rule for `*val` functions

Summary: Type casts should be used instead of calls to the `*val` functions as function calls impose additional overhead.

Test Plan: Added unit tests.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14572
src/__phutil_library_map__.php
src/lint/linter/xhpast/rules/ArcanistFunctionCallShouldBeTypeCastXHPASTLinterRule.php [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/ArcanistFunctionCallShouldBeTypeCastXHPASTLinterRuleTestCase.php [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/cast-functions.lint-test [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/parameter-mismatch.lint-test [new file with mode: 0644]