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
src/main/java/hudson/plugins/checkstyle/tokens/FixedCheckStyleWarningsTokenMacro.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.checkstyle.tokens; | ||
|
||
import hudson.Extension; | ||
import hudson.plugins.analysis.tokens.AbstractFixedAnnotationsTokenMacro; | ||
import hudson.plugins.checkstyle.CheckStyleMavenResultAction; | ||
import hudson.plugins.checkstyle.CheckStyleResultAction; | ||
|
||
/** | ||
* Provides a token that evaluates to the number of fixed Checkstyle warnings. | ||
* | ||
* @author Ulli Hafner | ||
*/ | ||
@Extension(optional = true) | ||
public class FixedCheckStyleWarningsTokenMacro extends AbstractFixedAnnotationsTokenMacro { | ||
/** | ||
* Creates a new instance of {@link FixedCheckStyleWarningsTokenMacro}. | ||
*/ | ||
@SuppressWarnings("unchecked") | ||
public FixedCheckStyleWarningsTokenMacro() { | ||
super("CHECKSTYLE_FIXED", CheckStyleResultAction.class, CheckStyleMavenResultAction.class); | ||
} | ||
} | ||
|
23 changes: 23 additions & 0 deletions
23
src/main/java/hudson/plugins/checkstyle/tokens/NewCheckStyleWarnningsTokenMacro.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.checkstyle.tokens; | ||
|
||
import hudson.Extension; | ||
import hudson.plugins.analysis.tokens.AbstractNewAnnotationsTokenMacro; | ||
import hudson.plugins.checkstyle.CheckStyleMavenResultAction; | ||
import hudson.plugins.checkstyle.CheckStyleResultAction; | ||
|
||
/** | ||
* Provides a token that evaluates to the number of new Checkstyle warnings. | ||
* | ||
* @author Ulli Hafner | ||
*/ | ||
@Extension(optional = true) | ||
public class NewCheckStyleWarnningsTokenMacro extends AbstractNewAnnotationsTokenMacro { | ||
/** | ||
* Creates a new instance of {@link NewCheckStyleWarnningsTokenMacro}. | ||
*/ | ||
@SuppressWarnings("unchecked") | ||
public NewCheckStyleWarnningsTokenMacro() { | ||
super("CHECKSTYLE_NEW", CheckStyleResultAction.class, CheckStyleMavenResultAction.class); | ||
} | ||
} | ||
|
8 changes: 8 additions & 0 deletions
8
...n/resources/hudson/plugins/checkstyle/tokens/FixedCheckStyleWarningsTokenMacro/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>$${CHECKSTYLE_FIXED}</dt> | ||
<dd> | ||
Expands to the total number of fixed Checkstyle warnings in a build. | ||
</dd> | ||
|
||
</j:jelly> |
8 changes: 8 additions & 0 deletions
8
...ain/resources/hudson/plugins/checkstyle/tokens/NewCheckStyleWarningsTokenMacro/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>$${CHECKSTYLE_NEW}</dt> | ||
<dd> | ||
Expands to the total number of new Checkstyle warnings in a build. | ||
</dd> | ||
|
||
</j:jelly> |