-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExcludeFromCodeCoverage annotation (better name than Generated) #1491
Comments
It'd be really nice if you could configure your own custom annotations to be excluded. Being able to supply a list of excluded annotations via setting I've got Composable Previews that I'd like to exclude from my codecov reports, but I'd like for them to live in the same file as the component they are a preview for. I can make an annotation, but these already have an annotation applied, and the code is also not generated either so requiring generated in the name leaves a bad taste. |
Instead of everybody creating a custom annotation that contains "Generated" with the only purpose of excluding it from coverage, it would be great to have one already defined by the library itself 👍 |
Scenario
Current Behaviour
Exclusions are supported in pom.xml and by string matching annotations on the word "Generated" according to Baeldung.com.
Wanted Behaviour
Exlusion based on an annotation with a better name. As inspiration; in .NET there are a C# attribute called ExcludeFromCodeCoverage.
Programmatic configuration is good. Adding a
Generated
annotation just to exclude from coverage doesn't make sense when the code is not generated. And the current implementation is flawed. An annotation to exclude classes makes sense.Possible Workarounds
The text was updated successfully, but these errors were encountered: