Issue #14019: Resolve pitest suppressions for XMLLogger fileMessages.…#16314
Conversation
romani
left a comment
There was a problem hiding this comment.
we need pitest removal.
items:
| @@ -0,0 +1,10 @@ | |||
| <?xml version="1.0"?> | |||
There was a problem hiding this comment.
we do not need this file, config should be loaded from src/test/resources/com/puppycrawl/tools/checkstyle/xmllogger/InputXMLLogger.java , please look at methods verifyXXxxxxxxxx
There was a problem hiding this comment.
pitest removal in this way or any real execution still exists. I think we should remove the line as it has no effect .
There was a problem hiding this comment.
please do removal, it is best effect of pitest, it helps to find dead code and not requireed code
There was a problem hiding this comment.
we do not need this file, config should be loaded from src/test/resources/com/puppycrawl/tools/checkstyle/xmllogger/InputXMLLogger.java , please look at methods verifyXXxxxxxxxx
But if we have multiple files and only one config used in all of them, why can't we use the best way to separate the config, as it reflects the real use case of Checkstyle?
There was a problem hiding this comment.
please do removal, it is best effect of pitest, it helps to find dead code and not requireed code
so you mean remove FileMessages.remove() from xmllogger right ?
There was a problem hiding this comment.
with pr #16345 and change in order of fileMessage.remove the mutation is killed

There was a problem hiding this comment.
Please push code, I still see old version of code without update in logger or pitest removal
|
pitest removal was already done in #16345, so I didn't change anything. |
|
OMG, so concurrent updates, ok, let's merge without update for pitest. |
romani
left a comment
There was a problem hiding this comment.
Thanks a lot.
Please help with other pitest survival, to make sure you fully understand how it works
Yes, I will start working on the next one to understand checkstyle more. Thank you very much for your help! |
…eConfigParserAndXmlLogger
…eConfigParserAndXmlLogger
#14019
Mutation
fileMessages.remove(fileName);The test case
testFileRemovalFromLoggerensures that callingfileFinishedmultiple times does not duplicate file entries in the log. If a violation is logged only once, it means the file was already removed in a previous call, triggering fileMessages.remove.