heya peeps :slightly_smiling_face: Would like to ...
# ktlint
d
heya peeps 🙂 Would like to check if this is known before I create an issue 🙇 for
Copy code
import android.view.View
import androidx.test.espresso.matcher.BoundedMatcher
import com.google.android.material.textfield.TextInputLayout
import org.hamcrest.Description
import org.hamcrest.Matcher

object TextInputLayoutMatchers {

    fun errorMatches(matcherText: String?): Matcher<View> {
        return object : BoundedMatcher<View, TextInputLayout>(TextInputLayout::class.java) {

            var reality: String? = null

            override fun describeTo(description: Description) {
                description.appendText("with item error: ${matcherText.toString()}, does not match: ${reality.toString()}")
            }

            override fun matchesSafely(editTextField: TextInputLayout): Boolean {
                reality = editTextField.error?.toString()
                return matcherText.equals(reality, ignoreCase = false)
            }
        }
    }
}
standard ktlint v0.39.0 errors out with: