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
9 changed files
with
73 additions
and
7 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/dry/tokens/FixedDryWarningsTokenMacro.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.dry.tokens; | ||
|
||
import hudson.Extension; | ||
import hudson.plugins.analysis.tokens.AbstractFixedAnnotationsTokenMacro; | ||
import hudson.plugins.dry.DryMavenResultAction; | ||
import hudson.plugins.dry.DryResultAction; | ||
|
||
/** | ||
* Provides a token that evaluates to the number of fixed duplicate code warnings. | ||
* | ||
* @author Ulli Hafner | ||
*/ | ||
@Extension(optional = true) | ||
public class FixedDryWarningsTokenMacro extends AbstractFixedAnnotationsTokenMacro { | ||
/** | ||
* Creates a new instance of {@link FixedDryWarningsTokenMacro}. | ||
*/ | ||
@SuppressWarnings("unchecked") | ||
public FixedDryWarningsTokenMacro() { | ||
super("DRY_FIXED", DryResultAction.class, DryMavenResultAction.class); | ||
} | ||
} | ||
|
23 changes: 23 additions & 0 deletions
23
src/main/java/hudson/plugins/dry/tokens/NewDryWarningsTokenMacro.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.dry.tokens; | ||
|
||
import hudson.Extension; | ||
import hudson.plugins.analysis.tokens.AbstractNewAnnotationsTokenMacro; | ||
import hudson.plugins.dry.DryMavenResultAction; | ||
import hudson.plugins.dry.DryResultAction; | ||
|
||
/** | ||
* Provides a token that evaluates to the number of new duplicate code warnings. | ||
* | ||
* @author Ulli Hafner | ||
*/ | ||
@Extension(optional = true) | ||
public class NewDryWarningsTokenMacro extends AbstractNewAnnotationsTokenMacro { | ||
/** | ||
* Creates a new instance of {@link NewDryWarningsTokenMacro}. | ||
*/ | ||
@SuppressWarnings("unchecked") | ||
public NewDryWarningsTokenMacro() { | ||
super("DRY_NEW", DryResultAction.class, DryMavenResultAction.class); | ||
} | ||
} | ||
|
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
8 changes: 8 additions & 0 deletions
8
src/main/resources/hudson/plugins/dry/tokens/FixedDryWarningsTokenMacro/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>$${DRY_FIXED}</dt> | ||
<dd> | ||
Expands to the total number of fixed duplicate code warnings in a build. | ||
</dd> | ||
|
||
</j:jelly> |
8 changes: 8 additions & 0 deletions
8
src/main/resources/hudson/plugins/dry/tokens/NewDryWarningsTokenMacro/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>$${DRY_NEW}</dt> | ||
<dd> | ||
Expands to the total number of new duplicate code warnings in a build. | ||
</dd> | ||
|
||
</j:jelly> |