]> khamidou — GitHub mirrors - arcanist.git/commit
Add a linter rule to prevent hardcoded class names
authorJoshua Spence <josh@joshuaspence.com>
Tue, 12 May 2015 20:50:30 +0000 (06:50 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Tue, 12 May 2015 20:51:15 +0000 (06:51 +1000)
commit9090efcb40ed29166bad7a6ba5c08d29ebd4ab77
treecc817842a7317a7e0c206bafeaa47cfc7ec062a2
parent73aca1f9f0b1984707b43579b2275d3179217875
Add a linter rule to prevent hardcoded class names

Summary: Add a linter rule to advise against the use of hardcoded class names. Hardcoded class names make the code harder to refactor and it is generally preferable to use the `__CLASS__` magic constant instead.

Test Plan: This works, but needs some polish.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12605
src/lint/linter/ArcanistXHPASTLinter.php
src/lint/linter/__tests__/xhpast/class-name-literal.lint-test [new file with mode: 0644]