Skip to content

Designer.bat is file is not generating xpath expression #3035

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

You must be logged in to vote

Hi @RaheemShaik999,
you're right, there are two ways of writing custom rules: XPath based rules and Java Rules. They are described in our documentation here: https://pmd.github.io/pmd-6.7.0/pmd_userdocs_extending_writing_pmd_rules.html and https://pmd.github.io/pmd-6.7.0/pmd_userdocs_extending_writing_xpath_rules.html .
XPath rules are usually simpler (e.g. they cannot maintain state) and Java-based rules are most flexible. XPath rules can be used easier in a custom ruleset, since the rule is entirely defined in XML. See also our doc on custom rulesets: https://pmd.github.io/pmd-6.7.0/pmd_userdocs_making_rulesets.html

A example for a custom java-based rule can be found here: https://githu…

Replies: 14 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by adangel
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1342 on January 15, 2021 09:31.