Register / Login
Win a copy of
Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA)
this week in the
IDEs, Version Control and other tools
Need a help in writing custom pmd rule using xpath query.
posted 5 years ago
I am using PMD code quality tool with eclipse.
I am trying to to write a new rule as per my coding standards.
I need to write a xpath query which matches the following rules.
begin and end on a new line.
// code here
2.Include spaces around operators.
value = num + y;
value=num+y; -> (missing spaces around = sign and + sign).
I have gone through the basic xpath tutorials.
please Let me know can we achieve the above rules using xpath.If so please give me a example for the above.
Currently I am trying to write the xpath query by using PMD rule Designer.
CheckStyle Rule : Making final to the local variables
Adding new rule to Eclipse's code analysis plugin PMD
Need help in writing regular expression .
Java code analysis tools.