Skip to content

Commit

Permalink
Removing integration with the Static Analysis Utilities plugin. (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Feb 24, 2021
1 parent 3cea402 commit 13bff82
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 130 deletions.
12 changes: 0 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,18 +154,6 @@
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>mailer</artifactId>
</dependency>
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-core</artifactId>
<version>1.54</version>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>config-file-provider</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import hudson.tasks.junit.TestResult;
import hudson.tasks.junit.TestResultAction;
import hudson.tasks.test.AggregatedTestResultAction;
import jenkins.model.Jenkins;
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted;

import java.util.ArrayList;
Expand Down Expand Up @@ -35,35 +34,6 @@ public Action getAction(String className) {
return null;
}

/**
* Returns all build actions that derive from
* <code>AbstractResultAction</code>. Every action represents a single
* analysis result.
*
* @return The static analysis actions for the current build. The returned
* list might be empty if there are no such actions.
*/
@Whitelisted
public List<Action> getStaticAnalysisActions() {
if (isPluginInstalled("analysis-core")) {
return new StaticAnalysisUtilities().getActions(build);
} else {
return Collections.emptyList();
}
}

/**
* Returns whether the specified plug-in is installed.
*
* @param shortName
* the plug-in to check
* @return <code>true</code> if the specified plug-in is installed,
* <code>false</code> if not.
*/
public static boolean isPluginInstalled(final String shortName) {
return Jenkins.get().getPlugin(shortName) != null;
}

@Whitelisted
public Action getCoberturaAction() {
return getAction("hudson.plugins.cobertura.CoberturaBuildAction");
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -371,56 +371,6 @@
</div>
</j:if>

<!-- Static Analysis -->
<j:set var="actions" value="${it.staticAnalysisActions}" />
<j:if test="${!actions.isEmpty()}">
<div class="content">
<h1>Static Analysis Results</h1>
<table>
<tr>
<th></th>
<th>Name</th>
<th>Result</th>
<th>Total</th>
<th>High</th>
<th>Normal</th>
<th>Low</th>
</tr>
<j:forEach var="action" items="${actions}">
<tr>
<td>
<img src="${rooturl}${action.smallImageName}" />
</td>
<td>
<a href="${rooturl}${build.url}/${action.urlName}">${action.displayName}</a>
</td>
<td class="center">
<j:choose>
<j:when test="${action.result.pluginResult=='SUCCESS'}">
<img src="${rooturl}static/e59dfe28/images/16x16/blue.gif" />
</j:when>
<j:when test="${action.result.pluginResult=='FAILURE'}">
<img src="${rooturl}static/e59dfe28/images/16x16/red.gif" />
</j:when>
<j:otherwise>
<img src="${rooturl}static/e59dfe28/images/16x16/yellow.gif" />
</j:otherwise>
</j:choose>
</td>
<td class="center">${action.result.numberOfAnnotations} </td>
<td class="center">${action.result.getNumberOfAnnotations('HIGH')} </td>
<td class="center">${action.result.getNumberOfAnnotations('NORMAL')} </td>
<td class="center">${action.result.getNumberOfAnnotations('LOW')} </td>
</tr>
</j:forEach>
</table>
<p>
Warning (see JENKINS-55744): Integration with the Static Analysis Utilities plugin has
been deprecated in the Email Extension plugin and will be removed in a future release.
</p>
</div>
</j:if>

<div class="content">
<!-- CONSOLE OUTPUT -->
<a href="${rooturl}${build.url}/console">
Expand Down

0 comments on commit 13bff82

Please sign in to comment.