On Thu, 2011-02-03 at 15:22 -0800, Peter Niederwieser wrote:
> 
> Johannes Buehler-3 wrote:
> > 
> >  - I defined a findbugs configuration within the plugin in order be able
> > to pass the findbugs classpath to the findbugs ant task. This results in
> > the need to declare a findbugs configuration in the buildscript, which
> > is of course not a good thing. 
> > 
> 
> I guess the FindBugs plugin should work similar to the code quality plugin
> in that it adds a task per source set. See "Chapter 25. The Code Quality
> Plugin" in the user guide. SourceSet provides access to the classes
> directory and the compile class path.
> 
That's how it is supposed to work already right now. The Problem is that
i have to pass the findbugs classpath (findbugs.jar + dependencies) to
the FindbugsAntTask i am using. 

> I think it's also important to have a way to run FindBugs for, say, Java but
> not Groovy code. It's easy to get just the Java sources with
> SourceSet.getAllJava(), but the question is how to map the sources to their
> corresponding classes. This seems to be difficult for source files that
> contain multiple classes or aren't named after the class. In languages like
> Groovy and Scala, this is a common situation.
> 
Since findbugs uses the bytecode for its analyses, Groovy Code can be
analysed as well. Bt you are right its almost impossible to map the
compiled classes properly the groovy source files. Anyhow the sources
are only need for better reporting purposes.

> 
> Johannes Buehler-3 wrote:
> > 
> >  - The findbugs task extends SourceTask, would the AbstractCompile be
> > more appropriate, cause findbugs uses the bytecode for the analysis.
> > 
> 
> I think neither is appropriate. FindBugs doesn't analyze the sources, and it
> doesn't compile anything either. ConventionTask seems like a good choice.
ok, i will try that out. I already introduced a dependency to the
compile task, cause findbugs needs the compiled artifact.

Thanks for the feedback
Johannes

> 
> --
> Peter Niederwieser 
> Developer, Gradle
> http://www.gradle.org
> Trainer & Consultant, Gradle Inc.
> http://www.gradle.biz
> Founder, Spock Framework
> http://spockframework.org
> 



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to