: Any thoughts on using FindBugs & PMD to catch more bugs in Lucene/Solr?  
: Jenkins could be configured to run FindBugs & PMD analysis nightly.  It 
: would have helped find this:

I was a big fan of PMD for a while, particularly because of how easy it is 
to not only tweak/customize the rulesets and severities, but also to write 
new rules entirely from scratch based on the specific principles of your 
domain.

Examples of things that i'm fairly certain would be straightforward PMD 
rules to write and might be invaluable to Lucene are along the lines of...
 * No class should use Arrays.copy
 * No class should call any of hte following constructors: [ insert 
   list of of all IO realted Constructors we can think of that rely on 
   platform charset ]
 * all classes in the code base which implement CodecProvider must call 
   Codecs.registerCodec(this) in at least one constructor
 * etc...

I use to use PMD quite a bit in a former life, but kind of got out of hte 
habbit and frequently forget about it.  somewhere in Jira is a [patch i 
submitted to change the solr build system to use PMD, and generate an XML 
report that would then be parsed and trigger a failure if there were any 
violations above a specified threshold, but if i remember correctly there 
was some sort of licensing issue at the time (maybe with the xslts PMD 
used to generate readable reports from the XML?)

I think all of that predated hudson/jenkins having it's own plugin for 
rendering hte XML results though, which is probably when 99% of the people 
would want to read it so i don't think there would be anything stoping us 
from using it now.


-Hoss

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to