Victor Grazi
Victor Grazi

Reputation: 16490

How can I designate lines of code for Clover to ignore?

I would like to tell Clover to ignore particular lines of my Java code. Is there any way to do so from within the code?

Something like

//// IGNORE vvvvvvv
System.out.println("Ignore this line and considered it covered");
//// IGNORE ^^^^^^^

If not, is there a clean way to do so by providing a context descriptor from outside the code?

Upvotes: 4

Views: 901

Answers (1)

grzlew
grzlew

Reputation: 590

you can use:

//CLOVER:OFF
//CLOVER:ON

Here's official doc about it

Upvotes: 5

Related Questions