Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add state "ignored" #85

Closed
nicojs opened this issue Aug 26, 2019 · 7 comments · Fixed by #239
Closed

Add state "ignored" #85

nicojs opened this issue Aug 26, 2019 · 7 comments · Fixed by #239
Labels
enhancement New feature or request

Comments

@nicojs
Copy link
Member

nicojs commented Aug 26, 2019

Both Stryker.NET as Stryker have (or will have) ways to ignore certain mutations (either by mutator name or other means). We want ignored mutations to also be visible in the mutation score. We should add this as a mutator state.

See stryker-mutator/stryker-js#1472

@Mobrockers what should the name be? I would prefer Ignored as it is really clear that the user choose to ignore it. Something like skipped could have any reason.

@nicojs nicojs added the enhancement New feature or request label Aug 26, 2019
@rouke-broersma
Copy link
Member

I like not having to change a status we already use 😁

We can provide a skipped reason already as well (skipped due to disabled mutator, skipped due to file exclusion, skipped due to method exclusion)

@hugo-vrijswijk
Copy link
Member

I like it! Stryker4s already has the possibility to filter out mutant categories. Though working them into the report might be a bit of refactoring.

Initially I thought 'Disabled' might make sense too, but Ignored is probably better as it doesn't imply user action (filtered out duplicate mutants could be Ignored, for example).

@nicojs
Copy link
Member Author

nicojs commented Aug 27, 2019

@Mobrockers you can still use Skipped internally, Stryker also uses Skipped (if I'm not mistaken). Like I said, I think Ignored communicates better what the reason is for it being skipped..

@rouke-broersma
Copy link
Member

I like it! Stryker4s already has the possibility to filter out mutant categories. Though working them into the report might be a bit of refactoring.

Initially I thought 'Disabled' might make sense too, but Ignored is probably better as it doesn't imply user action (filtered out duplicate mutants could be Ignored, for example).

I don't think duplicate mutants should be included in the report at all. When would there be a duplicate mutant? Creating a duplicate mutant should be avoided at all. It also doesn't fit with @nicojs 's reasoning for the name change, which is to clarify that the status Ignored always means Skipped due to user action/configuration.

@simondel
Copy link
Member

I'd prefer to call it Ignored. This status is also reflected in the config for the user: https://github.com/stryker-mutator/stryker-net/blob/master/docs/Configuration.md#ignore-methods

I'd also prefer to have a reason why the mutant was ignored.

@simondel
Copy link
Member

I'm working on adding this

@rouke-broersma
Copy link
Member

Our mutants already have a string ResultStatusReason { get; } so we can fill the reason if we get a field for it in the schema.

nicojs added a commit that referenced this issue Feb 15, 2020
Adds the MutantStatus `Ignored`. This state should be used whenever a user has chosen to ignore mutants.

These mutants are not counted in the score. They are added to the total number of generated mutants.

Fixes #85 

Co-authored-by: Hugo van Rijswijk <hugo.v.rijswijk@gmail.com>
Co-authored-by: Nico Jansen <jansennico@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants