Page MenuHomePhabricator

Fix ArcanistPHPCloseTagXHPASTLinterRule always bailing out
ClosedPublic

Authored by asherkin on Jul 24 2017, 1:52 PM.
Tags
None
Referenced Files
F19105935: D18271.diff
Sat, Dec 6, 4:19 PM
F19052368: D18271.id.diff
Fri, Nov 28, 4:50 AM
F19031656: D18271.id.diff
Tue, Nov 25, 2:19 AM
F19018221: D18271.id.diff
Nov 23 2025, 10:23 AM
F18927736: D18271.diff
Nov 9 2025, 9:18 PM
F18881441: D18271.id.diff
Nov 6 2025, 9:25 PM
F18822274: D18271.id.diff
Oct 23 2025, 5:31 AM
F18820814: D18271.diff
Oct 22 2025, 5:18 PM

Details

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

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable