mutant icon indicating copy to clipboard operation
mutant copied to clipboard

Add --skip-subject and --pending-subject flags

Open dkubb opened this issue 5 years ago • 1 comments

A feature request I have would be to add two flags to the mutant cli:

  • --skip-subject
  • --pending-subject

The --skip-subject flag should perform exactly the same as --ignore-subject, where it doesn't bother to mutate the subject nor run the subject's tests. This would be reserved for methods where attempting to mutate will cause an infinite loop and never finish.

The --pending-subject flag should mutate the subject and run it's tests, and report failure if the subject is fully mutation covered. The expectation is that these methods are safe to mutate, but are expected to have alive mutations.

Both of these flags should work with wildcards as well as explicit targets.

The reason for these two flags is that we noticed we were using --ignore-subject for both cases, but we want mutant to tell us when something is 100% covered so we can adjust configuration so we can begin asserting the methods stay 100% covered in the future. We believe that less than 5% of the methods we are currently ignoring should be unconditionally skipped.

dkubb avatar Sep 19 '19 20:09 dkubb

I like this idea. The existing infrastructure should be able to support this.

mbj avatar Sep 19 '19 23:09 mbj