Home GnuPG

Add a linter rule to detect the use of blacklisted functions
d477df00eb5bUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

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
Joshua Spence <josh@joshuaspence.com>Authored on Jan 5 2015, 12:51 AM
Parents
rARCeb3129408bba: Various improvements for `ArcanistClosureLinter`
Branches
Unknown
Tags
Unknown

Event Timeline

Joshua Spence <josh@joshuaspence.com> committed rARCd477df00eb5b: Add a linter rule to detect the use of blacklisted functions (authored by Joshua Spence <josh@joshuaspence.com>).Jan 5 2015, 12:51 AM