Inspectopedia
 
2024.3

'UastHintedVisitorAdapter' hints problems

Warning
Performance
New
Last modified: 03 December 2024

Reports missing or redundant hints in UastHintedVisitorAdapter creation.

UastHintedVisitorAdapter receives hints that allow to optimize UAST visitor execution by visiting only elements, which classes are specified in the hint list.

If the visitor implements, e.g., visitCallExpression method, but does not include UCallExpression in hints, then the method will not be executed.

If the visitor does not implement, e.g., visitCallExpression method, but does include UCallExpression in hints, then the inherited method will be unnecessarily executed.

New in 2024.2