hcoles / pitest

State of the art mutation testing system for the JVM
Apache License 2.0
1.68k stars 358 forks source link

Can't set <avoidCallsTo> easily to empty #1351

Open obfischer opened 2 weeks ago

obfischer commented 2 weeks ago

As logging is very important to our application, I would like to override avoidCallsTo and set it to empty.

So I tried to configure the plugin as follows:

<configuration>
    <avoidCallsTo/>
</configuration>

Unfortunately is was without any effect. The only effective way to 'empty' it was to fill it with a non-existing package like this:

<configuration>
    <avoidCallsTo>
        <avoidCallsTo>These.Element.Must.Be.Present</avoidCallsTo>
    </avoidCallsTo>
</configuration>

It would be nice, if the first variant shown also would work.

P.S.: Thank you for bringing PIT to us. P.P.S.: I am using PIT 1.16.3

thePolitician commented 2 weeks ago

@obfischer If you want to execute mutations for logging frameworks then you can just set the feature FLOGCALL to disabled check here.

<features>
   <feature>-flogcall</feature>
</features>