I am using PMD and will implement a new rule. The rule needs to make sure that if we have the following line:
The rule needs to make sure that when we have a Logger.fine() the previous line must be:
Is it possible to check this with an xpath expression? I have no problems in matching the Logger.fine() - method.
Then when this condition is fullfilled I need to check if the previous line is a if(Logger.enabled()). Is even possible?
All advice is appreciated.