Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:jenkinsci/pmd-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Jul 10, 2017
2 parents b30791d + 82c1b02 commit 17b1453
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pmd.iml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.jvnet.hudson.plugins:analysis-core:1.86" level="project" />
<orderEntry type="module" module-name="analysis-core" />
<orderEntry type="library" name="Maven: org.jenkins-ci.plugins:script-security:1.25" level="project" />
<orderEntry type="library" name="Maven: org.kohsuke:groovy-sandbox:1.10" level="project" />
<orderEntry type="library" name="Maven: de.java2html:java2html:5.0" level="project" />
Expand All @@ -23,7 +23,7 @@
<orderEntry type="library" name="Maven: joda-time:joda-time:1.6" level="project" />
<orderEntry type="library" name="Maven: org.jenkins-ci.plugins:structs:1.2" level="project" />
<orderEntry type="library" name="Maven: org.jenkins-ci:symbol-annotation:1.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.jvnet.hudson.plugins:analysis-test:1.18" level="project" />
<orderEntry type="module" module-name="analysis-test" scope="TEST" />
<orderEntry type="library" scope="TEST" name="Maven: org.jenkins-ci.plugins.workflow:workflow-job:1.5" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.jenkins-ci.plugins.workflow:workflow-support:1.5" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.jboss.marshalling:jboss-marshalling-river:1.4.9.Final" level="project" />
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-core</artifactId>
<version>1.86</version>
<version>1.88-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-test</artifactId>
<version>1.18</version>
<version>1.19-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package hudson.plugins.pmd.dashboard;

import org.kohsuke.stapler.DataBoundConstructor;

import hudson.Extension;
import hudson.model.Descriptor;
import hudson.plugins.analysis.core.AbstractProjectAction;
import hudson.plugins.analysis.dashboard.AbstractWarningsGraphPortlet;
import hudson.plugins.analysis.graph.AnnotationsByUserGraph;
import hudson.plugins.analysis.graph.BuildResultGraph;
import hudson.plugins.pmd.Messages;
import hudson.plugins.pmd.PmdProjectAction;
import hudson.plugins.view.dashboard.DashboardPortlet;

/**
* A portlet that shows the warnings of the last build by user and priority.
*
* @author Ulli Hafner
*/
public final class WarningsUserGraphPortlet extends AbstractWarningsGraphPortlet {
/**
* Creates a new instance of {@link WarningsUserGraphPortlet}.
*
* @param name
* the name of the portlet
* @param width
* width of the graph
* @param height
* height of the graph
* @param dayCountString
* number of days to consider
*/
@DataBoundConstructor
public WarningsUserGraphPortlet(final String name, final String width, final String height, final String dayCountString) {
super(name, width, height, dayCountString);

configureGraph(getGraphType());
}

@Override
protected Class<? extends AbstractProjectAction<?>> getAction() {
return PmdProjectAction.class;
}

@Override
protected String getPluginName() {
return "pmd";
}

@Override
protected BuildResultGraph getGraphType() {
return new AnnotationsByUserGraph();
}

/**
* Extension point registration.
*
* @author Ulli Hafner
*/
@Extension(optional = true)
public static class WarningsGraphDescriptor extends Descriptor<DashboardPortlet> {
@Override
public String getDisplayName() {
return Messages.Portlet_WarningsUserGraph();
}
}
}

1 change: 1 addition & 0 deletions src/main/resources/hudson/plugins/pmd/Messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ Portlet.WarningsTable=PMD warnings per project
Portlet.WarningsPriorityGraph=PMD warnings trend graph (priority distribution)
Portlet.WarningsNewVsFixedGraph=PMD warnings trend graph (new vs. fixed)
Portlet.WarningsTotalsGraph=PMD warnings trend graph (totals)
Portlet.WarningsUserGraph=PMD warnings (priority per author)
3 changes: 2 additions & 1 deletion src/main/resources/hudson/plugins/pmd/Messages_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ PMD.NewWarnings.Detail.header=Neue PMD Warnungen
Portlet.WarningsTable=PMD Warnungen pro Projekt
Portlet.WarningsPriorityGraph=PMD Warnungen Trend Graph (Verteilung nach Priorität)
Portlet.WarningsNewVsFixedGraph=PMD Warnungen Trend Graph (Verhältnis von neu zu behoben)
Portlet.WarningsTotalsGraph=PMD Warnungen Trend Graph (Gesamtanzahl)
Portlet.WarningsTotalsGraph=PMD Warnungen Trend Graph (Gesamtanzahl)
Portlet.WarningsUserGraph=PMD Warnungen (Verteilung nach Personen)

0 comments on commit 17b1453

Please sign in to comment.