-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kotlin Generated Code Mutation Survival #569
Comments
The fix for this would be the kotlin plugin https://github.com/pitest/pitest-kotlin However it is looking for someone to develop and maintain it. |
Oh wow - I wasn't aware of that. I'll definitely check it out.
Is there any list of plugins like this? I don't recall seeing anything on
the site, I might've just missed it though.
…On 3:27AM, Fri, Feb 15, 2019 Henry Coles ***@***.*** wrote:
The fix for this would be the kotlin plugin
https://github.com/pitest/pitest-kotlin
However it is looking for someone to develop and maintain it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#569 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGPf8J2CfldPRLu0_HhSKveZ67NpA0hcks5vNouWgaJpZM4a84OO>
.
|
@hcoles Any hope to it be published, even without active maintenance? pitest/pitest-kotlin#3 |
I solved the problem by using avoidCallsTo in the configuration. I use maven in this project, but something similar can be done with gradle as well:
|
false positive kotlin issues go away Taken from: hcoles/pitest#569 (comment)
Kotlin support is now available at https://docs.arcmutate.com/docs/kotlin.html |
When running against kotlin code, I'm getting a lot of false survivals of
removed call to kotlin/jvm/internal/Intrinsics::checkExpressionValueIsNotNull → SURVIVED
. I'm assuming this is code that's generated by the kotlin compiler for non-nullable types; I'm seeing it in lots of places, and I'm definitely not calling it anywhere directly.Kinda related, on an interpolated String (i.e. "Hello $name"), I'm getting a
removed call to java/lang/StringBuilder::toString → SURVIVED
. I'm early in writing tests for this project, so this might go away when I've actually written coverage for it, but it's a little confusing at first. Not as big a problem as the null check.If I add the Intrinsics class to the avoidCallsTo configuration, both of these goes away BUT I lose a lot of other potentially useful mutations too. (And the StringBuilder one is pretty useful too, assuming it kills when I've added the appropriate tests.) I've tried explicitly adding the method to avoidCalls, tried adding it to excludedMethods, no joy. I didn't expect adding it to avoidCalls to work, I believe that's class level, and I might've been using some wrong syntax for excludedMethods.
Any ideas?
The text was updated successfully, but these errors were encountered: