Figure 9.15. You can click on any point in the graph to investigate further
At the time of writing, this plugin requires Clover, so your build needs to have generated a Clover
XML coverage report, and you need to have installed and configured the Clover Jenkins plugin (see
Section 6.6.2, “Measuring Code Coverage with Clover”). However support for Cobertura and other
tools is planned.
9.7. Reporting on Open Tasks
When it comes to code quality, static analysis is not the only tool you can use. Another indicator of the
general health of your project can be found in the number of FIXME, TODO, @deprecated, and similar
tags scattered through the source code. If there are a lot of these, it can be a sign that your code base has
a lot of unfinished work, and is therefore not in a very finalized state.
The Jenkins Task Scanners plugin lets you keep track of these sorts of tags in your source code, and
optionally flag a build with a bad weather icon on the dashboard if there are too many open tasks.
To set this up, you need to install both the Static Analysis Utilities plugin and the Task Scanner plugin.
Once installed, you can activate the plugin in your project by checking the “Scan workspace for open
tasks” checkbox in the Build Settings section of your project job configuration.
Configuring the Task Scanner plugin is pretty straightforward (see Figure 9.16, “Configuring the Task
Scanner plugin is straightforward”). You simply enter the tags you want to track, with different priorities
if you consider certain tags to be more important than others. By default, the plugin will scan all the
Java source code in the project, but you can redefine this behavior by entering the Files to scan field.
In Figure 9.16, “Configuring the Task Scanner plugin is straightforward”, for example, we also check
XML and JSP files for tags.