Skip to content

Commit

Permalink
Merge pull request #1619 from jenkinsci/dependabot/maven/io.jenkins.p…
Browse files Browse the repository at this point in the history
…lugins-analysis-model-api-11.13.0

Bump io.jenkins.plugins:analysis-model-api from 11.6.0 to 11.13.0
  • Loading branch information
uhafner authored Nov 19, 2023
2 parents 09148ba + acb5ee5 commit 3cc7095
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 8 deletions.
4 changes: 2 additions & 2 deletions plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-pom</artifactId>
<version>6.10.0</version>
<version>6.15.0</version>
<relativePath />
</parent>

Expand All @@ -25,7 +25,7 @@
<changelist>-SNAPSHOT</changelist>
<module.name>${project.groupId}.warnings.ng</module.name>

<analysis-model-api.version>11.6.0</analysis-model-api.version>
<analysis-model-api.version>11.13.0</analysis-model-api.version>
<analysis-model-tests.version>${analysis-model-api.version}</analysis-model-tests.version>
<pull-request-monitoring.version>1.7.8</pull-request-monitoring.version>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -698,14 +698,14 @@ public int getDeltaSize() {
*
* @deprecated Replaced by {@link AnalysisResult#totals}.
*/
@Deprecated
@Deprecated @SuppressFBWarnings("SS_SHOULD_BE_STATIC")
private final transient int size = 0;
/**
* Old serialization item.
*
* @deprecated Replaced by {@link AnalysisResult#totals}.
*/
@Deprecated
@Deprecated @SuppressFBWarnings("SS_SHOULD_BE_STATIC")
private final transient int newSize = 0;
/**
* Old serialization item.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,7 @@ static class Execution extends AnalysisExecution<ResultAction> {
* the actual step to execute
*/
@SuppressWarnings("PMD.AvoidLiteralsInIfCondition")
@SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "Fail fast if no reports are provided")
Execution(@NonNull final StepContext context, final PublishIssuesStep step) {
super(context);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import edu.hm.hafner.analysis.registry.ParserRegistry;
import edu.hm.hafner.util.VisibleForTesting;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.verb.POST;
Expand Down Expand Up @@ -44,6 +45,7 @@ public class RegisteredParser extends ReportScanningTool {
* the unique ID of the tool in the analysis-model module
*/
@DataBoundConstructor
@SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "Fail fast if parser is not found")
public RegisteredParser(final String analysisModelId) {
super();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import edu.hm.hafner.analysis.Issue;
import edu.hm.hafner.analysis.Report;
import edu.hm.hafner.analysis.RevApiInfoExtension;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import org.kohsuke.stapler.DataBoundConstructor;
import org.jenkinsci.Symbol;
Expand Down Expand Up @@ -150,6 +151,7 @@ public static class RevApiRow extends TableRow {
private final String severity;
private String category;

@SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "Fail fast if wrong type has been passed")
RevApiRow(final AgeBuilder ageBuilder, final FileNameRenderer fileNameRenderer,
final DescriptionProvider descriptionProvider, final Issue issue,
final JenkinsFacade jenkinsFacade, final Serializable additionalData) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,21 @@ void shouldRemoveConsoleLogNotesBeforeRemovingColorCodes() {

AnalysisResult result = scheduleSuccessfulBuild(job);

assertThat(result).hasTotalSize(2);
assertThat(result).hasTotalSize(4).hasTotalErrorsSize(2).hasTotalNormalPrioritySize(2);
assertThat(result.getIssues().get(0))
.hasSeverity(Severity.WARNING_NORMAL);
assertThat(result.getIssues().get(1))
.hasDescription(
"<pre><code>Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!</code></pre>")
.hasSeverity(Severity.WARNING_NORMAL);
assertThat(result.getIssues().get(2))
.hasSeverity(Severity.ERROR);
assertThat(result.getIssues().get(2).getDescription())
.contains("Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile");
assertThat(result.getIssues().get(3))
.hasSeverity(Severity.ERROR);
assertThat(result.getIssues().get(3).getDescription())
.contains("Re-run Maven using the -X switch to enable full debug logging.");
}

/** Runs the Clang parser on an output file that contains 1 issue. */
Expand Down Expand Up @@ -823,7 +831,8 @@ void shouldShowWarningsOfGroovyParserWhenScanningConsoleLogWhenThatIsPermitted()
* if the test fails unexpectedly
*/
@Test
void shouldShowWarningsOfGroovyParserWhenScanningConsoleLogWhenThatIsPermittedAndUsingAddParser() throws IOException {
void shouldShowWarningsOfGroovyParserWhenScanningConsoleLogWhenThatIsPermittedAndUsingAddParser()
throws IOException {
WorkflowJob job = createPipeline();
ArrayList<String> stages = new ArrayList<>();
catFileContentsByAddingEchosSteps(stages, "pep8Test.txt");
Expand All @@ -837,8 +846,8 @@ void shouldShowWarningsOfGroovyParserWhenScanningConsoleLogWhenThatIsPermittedAn
String id = "another-groovy-pep8";

configuration.addParser(new GroovyParser(id, "Another Groovy Pep8",
"(.*):(\\d+):(\\d+): (\\D\\d*) (.*)",
toString("groovy/pep8.groovy"), ""));
"(.*):(\\d+):(\\d+): (\\D\\d*) (.*)",
toString("groovy/pep8.groovy"), ""));
testGroovyPep8JobIsSuccessful(job, id);
}

Expand Down

0 comments on commit 3cc7095

Please sign in to comment.