I've configured a simple doLast hook that produces a single html report.
Shouldn't be too hard to combine over multiple projects, and could stand to
be refined(should probably get the workingDir directly from the checkstyle
configuration object for instance).

    [checkstyleMain, checkstyleTest].each{ task->
      task.doLast {
           def workingDir = "${project.buildDir}/checkstyle".toString()
           ant.xslt(basedir: workingDir, destdir: workingDir, style:
"$checkstyleConfigDir/checkstyle-noframes-sorted.xsl")
    }

On Fri, Sep 3, 2010 at 4:04 PM, Adam Murdoch <[email protected]> wrote:

>
> On 03/09/2010, at 8:26 PM, rupert.thurner wrote:
>
> i was looking for a tool to produce checkstyle html reports which includes
> summary pages, e.g. over folders.
>
> a/b/c/src/org/whatever
> a/d/e/src/org/whatever
> f/g/h/src/org/whatever
>
> should result in:
>
> reports/checkstyle-summary-a-f.html
>   includes the total number of warnings and errors,
>   and the sums for a, f, including the links to
>   checkstyle-summary-b-d.html, checkstyle-summary-g.html
> reports/a/checkstyle-summary-b-d.html
>   includes the total number for a, and the sums for b,d
>   and the links to checkstyle-c.html, checkstyle-e.html
> reports/f/checkstyle-summary-g.html
>   same principle
> reports/a/b/c/checkstyle-c.html
>   report produced by checkstyle itself
> reports/a/d/e/checkstyle-e.html
> reports/f/g/h/checkstyle-h.html
>
> we do not use gradle to build the sources, but were wondering if gradle
> could be helpful in a simple way to generate such reports?
>
>
>
> There's nothing in Gradle that will do this out of the box, at least, not
> yet. At some point, we do want to add some kind of aggregation to the
> reporting.
>
> Until that happens, the Checkstyle task produces an XML result file which
> you could use to produce your own reports in your build. You could either
> run the task over all the source, and then generate all the various reports
> from the result result file. Or you could run the task once for each group
> of source and then generate aggregate reports from the results.
>
>
> --
> Adam Murdoch
> Gradle Developer
> http://www.gradle.org
> CTO, Gradle Inc. - Gradle Training, Support, Consulting
> http://www.gradle.biz
>
>

Reply via email to