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)
Tue, Apr 2, 7:44 AM
Unknown Object (File)
Mon, Apr 1, 10:37 AM
Unknown Object (File)
Fri, Mar 29, 11:42 AM
Unknown Object (File)
Thu, Mar 28, 8:04 PM
Unknown Object (File)
Mar 10 2024, 10:14 PM
Unknown Object (File)
Mar 8 2024, 6:10 PM
Unknown Object (File)
Feb 22 2024, 1:31 PM
Unknown Object (File)
Feb 22 2024, 10:15 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