Hi Benjamin, JaCoCo (which does the work behind the scenes) does not support configurable method exclusions. Unfortunately this is nowadays not as easy as it sounds, as boundaries between methods get blurry with modern language features like lambdas.
Cheers, -marc > On 19. Feb 2025, at 04:23, Benjamin van der Veen <[email protected]> > wrote: > > Hi folks, > > First of all, I'm not sure I'm barking up the right tree—I'm coming here by > way of the gradle plugin. Correct me if I'm in the wrong place. Second, yes, > I have searched the github issues, pull requests, and this mailing list. > > I got a coverage report generating in CI and I was pleased to find that the > project I'm working on is right around 67% coverage. Not bad! Investigating > further, I noticed that a large amount of what is not covered is `toString` > `equals` and `hashCode`. These are all generated by the IDE. I want these to > not figure in the reports. > > I've seen suggestion that I could declare my own annotation with the word > `Generated` in it and apply, one by one, to the methods in question. Suffice > to say I don't want to do that. > > I haven't found any way to simply filter methods by name from the coverage > report. And I haven't found anyone directly asking for this, either. Am I > missing something? Or am I the crazy one for wanting to blanket exclude > these three methods in particular? > > I'm appreciative of any advice. I might even be up for making a pull request > for a feature like this—simply filtering method out of the coverage report by > name/regex. > > Kind regards, > Benjamin van der Veen > > > > > -- > You received this message because you are subscribed to the Google Groups > "JaCoCo and EclEmma Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion visit > https://groups.google.com/d/msgid/jacoco/c29429ad-060b-4331-8283-6323c4b268a7n%40googlegroups.com > > <https://groups.google.com/d/msgid/jacoco/c29429ad-060b-4331-8283-6323c4b268a7n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/jacoco/45B30F06-CAEF-43A8-AF92-ED70A28EEA51%40mountainminds.com.
