Which static analysis tools for Java has easiest extension mechanism. I checked PMD
But the process of writing custom rules appears to be very involved.
Specifically, I want to know whether there is any tools that offers AspectJ like syntax for picking out interesting areas of code? I am aware of AspectJ's declare warning
but it appears to be limited in what it can do.
I have found a related question:
Static Analysis tool recommendation for Java? http://stackoverflow.com/questions/97599/static-analysis-tool-recommendation-for-java
The answers list many tools. But I want to find which one offers easiest option for writing custom rules.
Edit: So far PMD's XPath expressions suggested by Guillaume appears to be closest to what I am looking for. I will be exploring it shortly.