fettle icon indicating copy to clipboard operation
fettle copied to clipboard

Add list of not mutated methods to verbose output

Open baccatabob opened this issue 7 years ago • 4 comments

If a method is OK for test coverage but has no contents that can be mutated, it is silently omitted from all output, even verbose. Having a list of methods (and possibly properties) that couldn't be mutated would help users not have a false sense of security / nasty surprises when they discover that mutation isn't checking everything they thought it was.

baccatabob avatar Apr 07 '19 13:04 baccatabob

Yes I agree there's a potential for a false sense of security, thanks for raising @baccatabob .

Currently in verbose mode you'll get something like this when Fettle starts mutating:

Found file: MyClass.cs
   Found member MyClass.MyMethod

Would a solution be to add skipped members inline, so the output becomes more like this?

Found file: MyClass.cs
   Found member MyClass.MyMethod
      ...
   Skipped member MyClass.MyUnmutateableMethod
   Skipped member MyClass.MyUnmutateableProperty

oliwennell avatar Apr 07 '19 14:04 oliwennell

That would be good - thanks. I don't know if it needs to be more prominent, including in the default output, but this seems to be a good implementation to start with at least.

baccatabob avatar Apr 07 '19 15:04 baccatabob

👍

oliwennell avatar Apr 07 '19 17:04 oliwennell

Looking at the code a bit more deeply, this is actually going to be harder than I thought 😅 To avoid delaying other tickets being released I'll push this back to the one after (0.5.2).

oliwennell avatar Apr 17 '19 12:04 oliwennell