Skip to content

Commit

Permalink
Add JaCoCo configuration to check minimum coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
murdos committed Jan 29, 2024
1 parent 2716e1b commit afaeb29
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .jhipster/modules/history.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,25 @@
"module" : "application-service-hexagonal-architecture-documentation",
"date" : "2022-07-29T05:45:39.864617462Z",
"properties" : { }
}, {
"module" : "maven-java",
"date" : "2024-01-29T22:31:20.121046866Z",
"properties" : {
"packageName" : "com.mycompany.myapp",
"projectName" : "JHipster Sample Application",
"baseName" : "jhipsterSampleApplication",
"endOfLine" : "lf",
"indentSize" : 2
}
}, {
"module" : "jacoco-check-min-coverage",
"date" : "2024-01-29T22:31:20.126024517Z",
"properties" : {
"packageName" : "com.mycompany.myapp",
"projectName" : "JHipster Sample Application",
"baseName" : "jhipsterSampleApplication",
"endOfLine" : "lf",
"indentSize" : 2
}
} ]
}
}
27 changes: 27 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@
<configuration>
<excludes>
<exclude>**/generator/buildtool/maven/.mvn/wrapper/*</exclude>
<exclude>**/generator/buildtool/gradle/gradle/wrapper/*</exclude>
<exclude>src/main/webapp/app/common/primary/applicationlistener/WindowApplicationListener.ts</exclude>
</excludes>
</configuration>
Expand Down Expand Up @@ -648,6 +649,32 @@
<outputDirectory>target/jacoco/</outputDirectory>
</configuration>
</execution>
<execution>
<id>check</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<dataFile>target/jacoco/allTest.exec</dataFile>
<rules>
<rule>
<element>CLASS</element>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>1.00</minimum>
</limit>
<limit>
<counter>BRANCH</counter>
<value>COVEREDRATIO</value>
<minimum>1.00</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>

Expand Down

0 comments on commit afaeb29

Please sign in to comment.