Hi, the @Generated annotation needs to be of retention CLASS or RUNTIME.
Hint: javax.annotation.Generated which ships with the JDK has retention SOURCE and does not work for JaCoCo. Regards, -marc > On 14. Oct 2020, at 09:36, Brandon Largeau <[email protected]> wrote: > > Hello, > > I searched a lot about this but nothing really work. > > I'd like to exclude "main(String[] args)" from the coverage because this > isn't really a functionnality to test. > > I'm using jacoco through Gradle. > > Why do I want that ? Because main isn't covered by the tests (since there's > nothing to test in it). > > Should I put a call to main in the JUnit test ? > > I tested @Generated or even @ExcludeFromCodeCoverage but doesn't work. > > Thanks you! > > -- > 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 on the web visit > https://groups.google.com/d/msgid/jacoco/efba312b-275b-47cf-bd90-a3b6c7e57b00n%40googlegroups.com > > <https://groups.google.com/d/msgid/jacoco/efba312b-275b-47cf-bd90-a3b6c7e57b00n%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 on the web visit https://groups.google.com/d/msgid/jacoco/D6A86999-0236-4B20-8D1F-B38C29F84B3A%40mountainminds.com.
