Page MenuHomePhabricator

Fix ArcanistPHPCloseTagXHPASTLinterRule always bailing out

Authored by asherkin on Jul 24 2017, 1:52 PM.



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

Diff Detail

rARC Arcanist
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

asherkin created this revision.Jul 24 2017, 1:52 PM
epriestley accepted this revision.Jul 24 2017, 1:53 PM
This revision is now accepted and ready to land.Jul 24 2017, 1:53 PM
This revision was automatically updated to reflect the committed changes.