HomePhabricator

Add a linter rule to detect the use of blacklisted functions

Description

Add a linter rule to detect the use of blacklisted functions

Summary:
As mentioned in the Phabricator PHP coding standards, the eval function should be avoided. There is some good discussion on StackOverflow as well.

Having said that, instead of hardcoding eval(), I have generalised this enough to allow a set of "blacklisted" functions to be defined with xhpast.blacklisted.function in the .arclint file.

Test Plan: Added a test case.

Reviewers: Blessed Reviewers, epriestley

Reviewed By: Blessed Reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D10686

Details

Provenance
joshuaspenceAuthored on
joshuaspencePushed on Jan 4 2015, 11:52 PM
Reviewer
Blessed Reviewers
Differential Revision
D10686: Add a linter rule to detect the use of blacklisted functions
Parents
rARCeb3129408bba: Various improvements for `ArcanistClosureLinter`
Branches
Unknown
Tags
Unknown