HomePhabricator

Improve the "self member reference" linter rule

Description

Improve the "self member reference" linter rule

Summary:
Extends ArcanistSelfMemberReferenceXHPASTLinterRule to warn about the use of a hardcoded class name instead of self when instantiating a class. Arguably, we should maybe rename the linter rule from ArcanistSelfMemberReferenceXHPASTLinterRule to ArcanistSelfUsageXHPASTLinterRule, or even maybe split this rule into three separate rules:

  • ArcanistSelfMemberReferenceXHPASTLinterRule
  • ArcanistSelfSpacingXHPASTLinterRule
  • ArcanistSelfClassReferenceXHPASTLinterRule.

Test Plan: Added to existing test cases.

Reviewers: epriestley, Blessed Reviewers

Reviewed By: epriestley, Blessed Reviewers

Subscribers: Korvin

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