Is there a way to exclude auto-generated classes?

Description

Exclude auto-generated classes automatically instead of adding them to exclude list, specifically: Lombok @Data classes.

Repository

N/A

Versions

N/A

Additional Information

For example, Jacoco does this: https://www.rainerhahnekamp.com/en/ignoring-lombok-code-in-jacoco/

1 Like

In my projects lomboks @Data classes are completely ignored already.

For Example:

This file https://github.com/joinfaces/joinfaces/blob/master/joinfaces-autoconfigure/src/main/java/org/joinfaces/autoconfigure/myfaces/MyfacesProperties.java is not listed here https://codecov.io/gh/joinfaces/joinfaces/tree/master/joinfaces-autoconfigure/src/main/java/org/joinfaces/autoconfigure/myfaces because it contains 0 cover-able lines

Does that mean Constant classes are also ignore automatically? If that’s the case, this is so super cool.

Jacoco Reports for every class/file

  • how many instructions/lines the file contains
  • which of these instructions/lines are covered

If a file contains zero coverable instructions it’s completely ignored by codecov

@Data class doesn’t seem to be getting ignored for me.
30%20PM

@larsgrefer
Any update on this? I don’t want to add explicit ignore rules for each @Data class.

Hi @cueball, I’m not super familiar with Lombok, but would ignoring paths be useful for you? https://docs.codecov.io/docs/ignoring-paths