This repository has been archived by the owner on Apr 6, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED JENKINS-10027] Added new tokens for new and fixed warnings.
- Loading branch information
Showing
7 changed files
with
71 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
plugin/src/main/java/hudson/plugins/findbugs/tokens/FixedFindBugsWarningsTokenMacro.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package hudson.plugins.findbugs.tokens; | ||
|
||
import hudson.Extension; | ||
import hudson.plugins.analysis.tokens.AbstractFixedAnnotationsTokenMacro; | ||
import hudson.plugins.findbugs.FindBugsMavenResultAction; | ||
import hudson.plugins.findbugs.FindBugsResultAction; | ||
|
||
/** | ||
* Provides a token that evaluates to the number of fixed FindBugs warnings. | ||
* | ||
* @author Ulli Hafner | ||
*/ | ||
@Extension(optional = true) | ||
public class FixedFindBugsWarningsTokenMacro extends AbstractFixedAnnotationsTokenMacro { | ||
/** | ||
* Creates a new instance of {@link FixedFindBugsWarningsTokenMacro}. | ||
*/ | ||
@SuppressWarnings("unchecked") | ||
public FixedFindBugsWarningsTokenMacro() { | ||
super("ANALYSIS_FIXED", FindBugsResultAction.class, FindBugsMavenResultAction.class); | ||
} | ||
} | ||
|
23 changes: 23 additions & 0 deletions
23
plugin/src/main/java/hudson/plugins/findbugs/tokens/NewFindBugsWarningsTokenMacro.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package hudson.plugins.findbugs.tokens; | ||
|
||
import hudson.Extension; | ||
import hudson.plugins.analysis.tokens.AbstractNewAnnotationsTokenMacro; | ||
import hudson.plugins.findbugs.FindBugsMavenResultAction; | ||
import hudson.plugins.findbugs.FindBugsResultAction; | ||
|
||
/** | ||
* Provides a token that evaluates to the number of new FindBugs warnings. | ||
* | ||
* @author Ulli Hafner | ||
*/ | ||
@Extension(optional = true) | ||
public class NewFindBugsWarningsTokenMacro extends AbstractNewAnnotationsTokenMacro { | ||
/** | ||
* Creates a new instance of {@link NewFindBugsWarningsTokenMacro}. | ||
*/ | ||
@SuppressWarnings("unchecked") | ||
public NewFindBugsWarningsTokenMacro() { | ||
super("FINDBUGS_NEW", FindBugsResultAction.class, FindBugsMavenResultAction.class); | ||
} | ||
} | ||
|
8 changes: 8 additions & 0 deletions
8
.../main/resources/hudson/plugins/findbugs/tokens/FixedFindBugsWarningsTokenMacro/help.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<j:jelly xmlns:j="jelly:core"> | ||
|
||
<dt>$${FINDBUGS_FIXED}</dt> | ||
<dd> | ||
Expands to the total number of fixed FindBugs warnings in a build. | ||
</dd> | ||
|
||
</j:jelly> |
8 changes: 8 additions & 0 deletions
8
...rc/main/resources/hudson/plugins/findbugs/tokens/NewFindBugsWarningsTokenMacro/help.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<j:jelly xmlns:j="jelly:core"> | ||
|
||
<dt>$${FINDBUGS_NEW}</dt> | ||
<dd> | ||
Expands to the total number of new FindBugs warnings in a build. | ||
</dd> | ||
|
||
</j:jelly> |