Closed marandaneto closed 1 year ago
The program does not parse the code, that way it is agnostic to the programming language. You can provide your own rules in an xml configuration and ignore the built in rule set. The consequence of this design is that it is not possible to exclude a certain pattern for strings, but not for string interpolation. A general exclusion for all strings can be added to the default rules, but i am not sure if that is needed. You can always add your own exclusion rules by adding --rules <file.xml>
to the call of the executable. See also https://github.com/domohuhn/mutation-test#exclude
I will have to think about that a bit more.
A general exclusion for all strings can be added to the default rules, but i am not sure if that is needed
That is the problem, for languages that have String interpolation, this rule which is useful has to be disabled, I understand the need of being agnostic but this is a side effect and consequently a bug.
I added a command line flag in version 1.6 that should exclude most strings without interpolation.
That should help, thanks for doing this.
For the given String
'a+b'
the Regex will be a match and it will be executed, it's a false positive since it's not an arithmetic operation.For String templates, only mutates if it's using variables such as
'$a+$b'
,'${a + b}'
, etc.