Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cobertura Maven Plugin doesn't check regex parameters #26

Open
gerrit-hohl opened this issue Dec 19, 2016 · 0 comments
Open

Cobertura Maven Plugin doesn't check regex parameters #26

gerrit-hohl opened this issue Dec 19, 2016 · 0 comments

Comments

@gerrit-hohl
Copy link

Hello everyone, 馃槃

last week I came across the following problem: I had a few classes in which I couldn't get the needed / defined branch coverage rate. So I tried to use the element in the configuration of the plugin. As only the branch coverage rate was the problem I also defined only this parameter. So it looked something like this:

                <configuration>
                    <check>
                        <regexes>
                            <regex>
                                <pattern>my.package.MyClass</pattern>
                                <branchRate>61</branchRate>
                            </regex>
                        </regexes>
                    </check>
                </configuration>

I started my Maven build and got a very odd error from Cobertura (not the plugin) that a value couldn't be parsed. After some searching and debugging I found the problem: The parameter was missing. And if that functionality is used both parameters - and are mandatory for Cobertura. But the Cobertura Maven Plugin doesn't validate that.

It would have been much easier if the plugin would have failed with an error message which pointed this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant