Closed pentp closed 1 year ago
could you please provide an example? We do have unit tests for conditional invocation, and those are supported as far as we know it.
I don't see any such tests and I just verified that if I remove the ?
, such method invocations are ignored as expected:
Logger.Verbose.Log("This statement removal mutation is ignored");
Logger.Verbose?.Log("This statement removal mutation isn't ignored and survives");
Using this config: "ignore-methods": [ "Log" ]
Edit: found the unit test for conditional invocation filtering, so not sure why it's not working. Probably because the unit test only tests mutants inside the invocation, but not statement removal mutations.
but they may be ineffective as they do not work on actual mutations.
Describe the bug Method calls using null-conditional invocation syntax are not filtered out by
ignore-methods
configuration setting.Expected behavior Method calls using null-conditional invocation syntax are filtered out by
ignore-methods
configuration like normal method invocations.Desktop:
Additional context Probably because the Roslyn syntax tree looks quite different: