HomePhabricator

Fix ArcanistPHPCloseTagXHPASTLinterRule always bailing out

Description

Fix ArcanistPHPCloseTagXHPASTLinterRule always bailing out

Summary:
D13794 changed ArcanistPHPCloseTagXHPASTLinterRule to ignore inline HTML blocks, but selectDescendantsOfType returns an AASTNodeList (which always exists).

Instead, check that the count() of the node list is > 0.

empty.lint-test had to be changed, it wouldn't have been accepted had this rule not been broken before it was commited.

Added tests to cover ArcanistPHPCloseTagXHPASTLinterRule in the future.

Test Plan: arc unit

Reviewers: Blessed Reviewers, epriestley

Reviewed By: Blessed Reviewers, epriestley

Subscribers: epriestley

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

Details

Provenance
asherkinAuthored on Jul 22 2017, 2:02 AM
asherkinPushed on Jul 24 2017, 1:55 PM
Reviewer
Blessed Reviewers
Differential Revision
D18271: Fix ArcanistPHPCloseTagXHPASTLinterRule always bailing out
Parents
rARC7bb8dbabce83: Reduce the strength of "arc executing on arc" from an error to a warning
Branches
Unknown
Tags
Unknown
Build Status
Buildable 17788
Build 23885: Run Core Tests