Open zimmski opened 9 years ago
This is a hard problem which I have with other analysis tools too. I think it would be better to utilize a generic solution instead of hardcoding this into go-mutesting.
How about adding a tag to the line (block of lines) that shouldn't be mutated?
Perhaps something like: // +go-mutesting: blacklist
at the end of the line.
Or for a block of lines (if applicable):
// +go-mutesting: +blacklist
...{code over several lines}...
// +go-mutesting: -blacklist
The problem is that the blacklisting cannot be marked in the source code, since it is mutation specific, and there can be many mutations for the same source code line.
EDIT: Also it would taint the source code itself, making it less readable. I would also prefer an outside solution so that it would be possible to use an UI for blacklisting that does not modify/has access to the code.
The problem with using MD5 checksums for blacklisting mutations (blacklisting false-positives) is that a simple change in the source code (e.g. because of a new feature) will change ALL checksums and will therefore make the checksum of the blacklist obsolete. A more smart mechansim must be implemented to make blacklisting really possible.