PMD provides a couple of custom XPath functions, that can be called, see
https://docs.pmd-code.org/latest/pmd_userdocs_extending_writing_xpath_rules.html#pmd-extension-functions
However, there is no documentation available yet, that describes, how to implement/add such a custom function for your own language or for existing languages.
It should be added e.g. here https://docs.pmd-code.org/snapshot/pmd_devdocs_major_adding_new_language_javacc.html#xpath-integration
Important classes:
- net.sourceforge.pmd.lang.rule.xpath.impl.XPathHandler
- net.sourceforge.pmd.lang.rule.xpath.impl.XPathFunctionDefinition
Related issues:
PMD provides a couple of custom XPath functions, that can be called, see
https://docs.pmd-code.org/latest/pmd_userdocs_extending_writing_xpath_rules.html#pmd-extension-functions
However, there is no documentation available yet, that describes, how to implement/add such a custom function for your own language or for existing languages.
It should be added e.g. here https://docs.pmd-code.org/snapshot/pmd_devdocs_major_adding_new_language_javacc.html#xpath-integration
Important classes:
Related issues: