Android + JaCoCo 0.8.8 - Possible to ignore generated methods/code?

39 views
Skip to first unread message

Zach

unread,
Oct 16, 2022, 10:22:30 PM10/16/22
to Jenkins JaCoCo plugin mailing list
Hi all,

I'm using JaCoCo 0.8.8 on an Android project and have gotten distracted by the missing coverage on a few generated methods resulting from code like this:

```
override val viewModel: VM by viewModels { viewModelProviderFactory }
```

Which outputs methods like this: `MainFragment.special..inlined.viewModels.default.new Function0() {...}` with missing coverage.

I know I can ignore classes/directories/etc. via jacoco configuration, and I've tested out usage of an annotation with "Generated" in the name to ignore methods, but the `viewModel` value here is a val, so it does not get ignored correctly when annotated...

Any ideas?  Thank you.
Reply all
Reply to author
Forward
0 new messages