-
Notifications
You must be signed in to change notification settings - Fork 126
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
Exclude companion object #328
Comments
Also, if I have something like this: object Animal {
def apply: Animal = ???
}
class Animal extends AbstractAnimal {
???
}
class AbstractAnimal {
???
} And I just want to exclude both object and class Animal I can't make it work. Adding |
Caveat, I haven't tried this, but... Would using an exclusion string of (BTW, I'm assuming that these elements are part of a package. If not, try a regex of just If that doesn't work, you can also use the comment exclusion approach: // $COVERAGE-OFF$Don't include companion object in coverage analysis.
object Animal {
def apply: Animal = ???
}
// $COVERAGE-ON$
class Animal {
???
}
// etc. Let me know if that does the trick... (EDIT: More on Java regular expressions.) |
Hi @MichaelJAllen, thanks but unfortunately doesn't do the trick, I just tried... I was aware about the comment exclusion approach but I don't like it. I'd rather keep my code clean than have a "non-real" higher test coverage. |
Hi, I'm wondering whether it is possible to exclude a companion object?
Given:
Is it possible just to exclude the object Animal and not the class? I can't make it work with the exclusion rules.
The text was updated successfully, but these errors were encountered: