Hope you doing good. I actually need your help to write a couple of more rules using XPath. I am not able to get them working rite. The following are the conditions that I want to check using XPath rules:
1) Rule that checks for open ResultSets, Statements, PreparedStatements and also ensures that these are closed only in the finally block.
2) Rule to ensure rollback statements are surrounded in a try/catch block.
3) Rule to check Naiming Conventions for PreparedStatement,Statement,ResultSet,CallableStatement. ie. Prepared Statements should start only with the letters 'pstmt'etc. (I have written a rule for this already and it works fine. So you might want to skip this)
4) Rule to check the length of variables such that it does not exceed 25 characters.
Kindly give me the rules if you can.