Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Upgrade spotbugs, sonarsource parent, codenarc, spotless-maven-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Amitoj Duggal committed Dec 26, 2023
1 parent 81d27e7 commit 4d5e080
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.sonarsource.parent</groupId>
<artifactId>parent</artifactId>
<version>59.0.29</version>
<version>64.0.211</version>
</parent>

<groupId>org.sonarsource.groovy</groupId>
Expand Down Expand Up @@ -98,7 +98,7 @@
<dependency>
<groupId>org.codenarc</groupId>
<artifactId>CodeNarc</artifactId>
<version>2.2.0</version>
<version>3.3.0</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.groovy</groupId>
Expand Down Expand Up @@ -161,7 +161,7 @@
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.29.0</version>
<version>2.41.1</version>
<executions>
<execution>
<goals>
Expand Down
4 changes: 2 additions & 2 deletions sonar-groovy-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
<version>4.5.3</version>
<version>4.8.3</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -118,7 +118,7 @@
<configuration>
<rules>
<requireFilesSize>
<maxsize>15000000</maxsize>
<maxsize>20000000</maxsize>
<minsize>11000000</minsize>
<files>
<file>${project.build.directory}/${project.build.finalName}.jar</file>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Sonar Groovy Plugin
* Copyright (C) 2010-2021 SonarQube Community
* Copyright (C) 2010-2023 SonarQube Community
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -131,7 +131,7 @@ public void shouldHandleTestSuiteDetails() throws URISyntaxException {
context
.measure(":org.sonar.core.ExtensionsFinderTest", CoreMetrics.SKIPPED_TESTS)
.value())
.isEqualTo(0);
.isZero();

assertThat(context.measure(":org.sonar.core.ExtensionsFinderTest2", CoreMetrics.TESTS).value())
.isEqualTo(2);
Expand All @@ -144,17 +144,17 @@ public void shouldHandleTestSuiteDetails() throws URISyntaxException {
context
.measure(":org.sonar.core.ExtensionsFinderTest2", CoreMetrics.TEST_FAILURES)
.value())
.isEqualTo(0);
.isZero();
assertThat(
context
.measure(":org.sonar.core.ExtensionsFinderTest2", CoreMetrics.TEST_ERRORS)
.value())
.isEqualTo(0);
.isZero();
assertThat(
context
.measure(":org.sonar.core.ExtensionsFinderTest2", CoreMetrics.SKIPPED_TESTS)
.value())
.isEqualTo(0);
.isZero();

assertThat(context.measure(":org.sonar.core.ExtensionsFinderTest3", CoreMetrics.TESTS).value())
.isEqualTo(1);
Expand All @@ -167,12 +167,12 @@ public void shouldHandleTestSuiteDetails() throws URISyntaxException {
context
.measure(":org.sonar.core.ExtensionsFinderTest3", CoreMetrics.TEST_FAILURES)
.value())
.isEqualTo(0);
.isZero();
assertThat(
context
.measure(":org.sonar.core.ExtensionsFinderTest3", CoreMetrics.TEST_ERRORS)
.value())
.isEqualTo(0);
.isZero();
assertThat(
context
.measure(":org.sonar.core.ExtensionsFinderTest3", CoreMetrics.SKIPPED_TESTS)
Expand Down Expand Up @@ -266,7 +266,7 @@ public void measuresShouldNotIncludeSkippedTests() throws URISyntaxException {

assertThat(context.measure(":org.sonar.Foo", CoreMetrics.TESTS).value()).isEqualTo(2);
assertThat(context.measure(":org.sonar.Foo", CoreMetrics.TEST_FAILURES).value()).isEqualTo(1);
assertThat(context.measure(":org.sonar.Foo", CoreMetrics.TEST_ERRORS).value()).isEqualTo(0);
assertThat(context.measure(":org.sonar.Foo", CoreMetrics.TEST_ERRORS).value()).isZero();
assertThat(context.measure(":org.sonar.Foo", CoreMetrics.SKIPPED_TESTS).value()).isEqualTo(1);
}

Expand All @@ -284,9 +284,9 @@ public void noSuccessRatioIfNoTests() throws URISyntaxException {
"/org/sonar/plugins/groovy/surefire/SurefireSensorTest/noSuccessRatioIfNoTests/")
.toURI())));

assertThat(context.measure(":org.sonar.Foo", CoreMetrics.TESTS).value()).isEqualTo(0);
assertThat(context.measure(":org.sonar.Foo", CoreMetrics.TEST_FAILURES).value()).isEqualTo(0);
assertThat(context.measure(":org.sonar.Foo", CoreMetrics.TEST_ERRORS).value()).isEqualTo(0);
assertThat(context.measure(":org.sonar.Foo", CoreMetrics.TESTS).value()).isZero();
assertThat(context.measure(":org.sonar.Foo", CoreMetrics.TEST_FAILURES).value()).isZero();
assertThat(context.measure(":org.sonar.Foo", CoreMetrics.TEST_ERRORS).value()).isZero();
assertThat(context.measure(":org.sonar.Foo", CoreMetrics.SKIPPED_TESTS).value()).isEqualTo(2);
}

Expand All @@ -307,7 +307,7 @@ public void ignoreSuiteAsInnerClass() throws URISyntaxException {
// ignore TestHandler$Input.xml
assertThat(
context.measure(":org.apache.shindig.protocol.TestHandler", CoreMetrics.TESTS).value())
.isEqualTo(0);
.isZero();
assertThat(
context
.measure(":org.apache.shindig.protocol.TestHandler", CoreMetrics.SKIPPED_TESTS)
Expand Down

0 comments on commit 4d5e080

Please sign in to comment.