]> khamidou — GitHub mirrors - arcanist.git/commit
Add a linter rule for use of `is_a`
authorJoshua Spence <josh@freelancer.com>
Tue, 22 Dec 2015 21:42:00 +0000 (08:42 +1100)
committerJoshua Spence <josh@freelancer.com>
Tue, 22 Dec 2015 21:44:39 +0000 (08:44 +1100)
commitb3e68c9f179318d65b6a2512efa6830e0362de8e
tree69afea75f6fd575b7270f078c8c0bd18808be71d
parent9ee14d28490c32151b98f21c2371454a3aae77a2
Add a linter rule for use of `is_a`

Summary: `instanceof` should be used instead of `is_a`. I need to do a bit more research here to see if there are any edge cases.

Test Plan: Added unit tests.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14573
src/__phutil_library_map__.php
src/lint/linter/xhpast/rules/ArcanistIsAShouldBeInstanceOfXHPASTLinterRule.php [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/ArcanistIsAShouldBeInstanceOfXHPASTLinterRuleTestCase.php [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/is_a-should-be-instanceof/allow_string.lint-test [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/is_a-should-be-instanceof/is_a.lint-test [new file with mode: 0644]