Page MenuHomePhabricator

Fix ArcanistPHPCloseTagXHPASTLinterRule always bailing out
ClosedPublic

Authored by asherkin on Jul 24 2017, 1:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jul 10, 5:08 PM
Unknown Object (File)
Sat, Jul 4, 5:47 AM
Unknown Object (File)
Jun 27 2026, 1:37 AM
Unknown Object (File)
Jun 20 2026, 6:16 PM
Unknown Object (File)
Apr 22 2026, 12:23 PM
Unknown Object (File)
Apr 17 2026, 6:35 PM
Unknown Object (File)
Mar 28 2026, 3:15 PM
Unknown Object (File)
Mar 12 2026, 6:28 AM

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