You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an Android library module that depends on the toSpannable() extension from Android core-ktx and version 0.34.0 of ktlint is detecting import androidx.core.text.toSpannable as an unused import. When I run the formatter, it removes the import which then cause the code to fail compilation.
Sample Repro:
packagecom.fooimportandroid.text.Spannableimportandroidx.core.text.toSpannable// <-- Considered as unusedfunfoo(text:String): Spannable {
return text.toSpannable()
}
The text was updated successfully, but these errors were encountered:
Thanks, Marcelo. This is the second regression reported on this rule in 0.34.0 so I'll take a look but if it's not obvious what's going on, I'll go ahead and revert the changes we made in this release. Sorry for the inconvenience!
I have an Android library module that depends on the
toSpannable()
extension from Androidcore-ktx
and version0.34.0
of ktlint is detectingimport androidx.core.text.toSpannable
as an unused import. When I run the formatter, it removes the import which then cause the code to fail compilation.Sample Repro:
The text was updated successfully, but these errors were encountered: