Replies: 1 comment
-
https://stryker-mutator.io/docs/stryker-net/ignore-mutations/#stryker-comments |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sometimes I run into mutations that are just alternative but correct code.
For example, if I have a method that takes a list of integers and finds the median value, I would sort the list ascending and then retrieve the element in the middle or average the two middle elements if the list has an even number. Stryker will mutate the function to sort the list descending and then give me a smug look while chastising me for not killing it, but sorting descending is still valid. The elements in the middle are still the elements in the middle either way. Is there a way of ignoring that specific mutation on that line of code, or do I need to ignore the entire method?
Beta Was this translation helpful? Give feedback.
All reactions