Skip to content

Can an (XPath) rule check the current file name? #3444

Answered by adangel
rsoesemann asked this question in Q&A
Discussion options

You must be logged in to vote

With PMD 6.38.0 and later, there is a new XPath function "pmd:fileName()" which returns the current filename - see https://docs.pmd-code.org/snapshot/pmd_userdocs_extending_writing_xpath_rules.html#pmd-fileName for the docs.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@rsoesemann
Comment options

rsoesemann Aug 6, 2021
Collaborator Author

@oowekyala
Comment options

@rsoesemann
Comment options

rsoesemann Aug 7, 2021
Collaborator Author

Comment options

You must be logged in to vote
0 replies
Answer selected by adangel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants