Skip to content

Commit

Permalink
Sonar coverage fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tshan10 committed Oct 22, 2024
1 parent 9e9a338 commit 92ce837
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<sonatype.central.publishing.maven.plugin.version>0.5.0</sonatype.central.publishing.maven.plugin.version>
<maven.release.plugin.version>2.5.3</maven.release.plugin.version>
<maven.gpg.plugin.version>1.6</maven.gpg.plugin.version>
<maven.sonar.plugin.version>3.9.1.2184</maven.sonar.plugin.version>

<!-- Test related properties -->
<mockito.version>4.3.1</mockito.version>
Expand All @@ -97,14 +98,21 @@
<jdk.target.version>17</jdk.target.version>
<jdk.release.version>17</jdk.release.version>

<!-- Sonar properties -->
<sonar.projectKey>PhonePe_DLM</sonar.projectKey>
<sonar.organization>phonepe</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.sources>src/main</sonar.sources>
<sonar.tests>src/test</sonar.tests>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
<sonar.language>java</sonar.language>
<sonar.qualitygate.wait>true</sonar.qualitygate.wait>

<sonar.exclusions>
<!-- Excluding test classes from sonar smells -->
**/src/test/com/phonepe/dlm/**/*.java,
**/src/test/com/phonepe/dlm/*.java
**/src/test/java/com/phonepe/dlm/**/*.java,
**/src/test/java/com/phonepe/dlm/*.java
</sonar.exclusions>
</properties>

Expand Down Expand Up @@ -275,20 +283,37 @@
<goals>deploy</goals>
</configuration>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${maven.sonar.plugin.version}</version>
<executions>
<execution>
<id>sonar-run</id>
<phase>verify</phase>
<goals>
<goal>sonar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.maven.plugin.version}</version>
<executions>
<execution>
<id>prepare-agent</id>
<phase>initialize</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<append>true</append>
</configuration>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
Expand Down

0 comments on commit 92ce837

Please sign in to comment.