hudson.plugins.pmd.PmdResultAction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pmd Show documentation
Show all versions of pmd Show documentation
This plug-in generates the trend report for PMD, an
open source static code analysis program.
package hudson.plugins.pmd;
import hudson.model.AbstractBuild;
import hudson.plugins.analysis.core.AbstractResultAction;
import hudson.plugins.analysis.core.HealthDescriptor;
import hudson.plugins.analysis.core.PluginDescriptor;
/**
* Controls the live cycle of the PMD results. This action persists the
* results of the PMD analysis of a build and displays the results on the
* build page. The actual visualization of the results is defined in the
* matching summary.jelly
file.
*
* Moreover, this class renders the PMD result trend.
*
*
* @author Ulli Hafner
*/
public class PmdResultAction extends AbstractResultAction {
/**
* Creates a new instance of PmdResultAction
.
*
* @param owner
* the associated build of this action
* @param healthDescriptor
* health descriptor to use
* @param result
* the result in this build
*/
public PmdResultAction(final AbstractBuild, ?> owner, final HealthDescriptor healthDescriptor, final PmdResult result) {
super(owner, new PmdHealthDescriptor(healthDescriptor), result);
}
/**
* Creates a new instance of PmdResultAction
.
*
* @param owner
* the associated build of this action
* @param healthDescriptor
* health descriptor to use
*/
public PmdResultAction(final AbstractBuild, ?> owner, final HealthDescriptor healthDescriptor) {
super(owner, new PmdHealthDescriptor(healthDescriptor));
}
/** {@inheritDoc} */
public String getDisplayName() {
return Messages.PMD_ProjectAction_Name();
}
@Override
protected PluginDescriptor getDescriptor() {
return new PmdDescriptor();
}
}