Skip to content

limit > 1 breaks rule config #783

@skywalker01101

Description

@skywalker01101

Steps to reproduce

I created a rule

<rule implementation="org.jacoco.maven.RuleConfiguration">
                                    <element>PACKAGE</element>
                                    <limits>
                                        <limit implementation="org.jacoco.report.check.Limit">
                                            <counter>INSTRUCTION</counter>
                                            <value>COVEREDRATIO</value>
                                            <!-- Note: if you put in a value > 1 it will report 0% coverage! I'm reporting this bug to Jacoco. -->
                                            <minimum>90</minimum>
                                        </limit>
                                    </limits>
                                </rule>

This blows up saying every package in the project has 0% coverage. When I look at the html reports they still have real looking coverage info. This caused me to waste a lot of time and great frustration. I almost gave up.

JaCoCo version: jacoco-maven-plugin:0.8.2
Operating system: MacOS
Tool integration: Maven

Expected behaviour

If a value greater than 1 is entered it should either report an invalid limit or just show the package level as being below the impossible value of 1.

Actual behaviour

Currently blows up saying 0% coverage even though the html report shows the accurate value.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions