Issue #13321: Kill mutation for TranslationCheck-1#13366
Issue #13321: Kill mutation for TranslationCheck-1#13366romani merged 1 commit intocheckstyle:masterfrom
Conversation
b649c5d to
3e36015
Compare
| key, | ||
| args, | ||
| getId(), | ||
| null, |
There was a problem hiding this comment.
This will mean that:
If used define id for module - https://checkstyle.org/config.html#Id
It will not be printed to user in report instead of module name, so just module name will be used. If user has two instances of same module type he will not know what module instance caused it.
Example of id printing instead of module name in CLI output - #13038
We can not cover such mutation by our Inputs with embedded config. But we should create test method that validate violation id with config defined in java code and assert on violation object field or checking content of some test audit listener https://checkstyle.org/config.html#Audit_Listeners we should already have some tests for this.
There was a problem hiding this comment.
ok i got it Thanks.
I found this type of testing at https://github.com/checkstyle/checkstyle/blob/master/src/test/java/com/puppycrawl/tools/checkstyle/AuditEventDefaultFormatterTest.java
i have update an exisiting test is it fine
|
We just extended test, I am merging |
Issue #13321: Kill mutation for TranslationCheck-1
Check
https://checkstyle.org/checks/misc/translation.html#Translation
Mutation
checkstyle/config/pitest-suppressions/pitest-misc-suppressions.xml
Lines 174 to 190 in 2be5780
Explaination
To Kill the mutation unmodifiableCollectionUtil I have used avoid call to for out class created to wrap that method in util by default avoidcall to is applied to https://pitest.org/quickstart/maven/#:~:text=If%20a%20list%20is%20not%20explicitly%20supplied%20then%20PIT%20will%20default%20to%20a%20list%20of%20common%20logging%20packages%20as%20follows
so add log method to avoid the error at
checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java
Line 672 in 2be5780
checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java
Line 327 in 0831953