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
It's very easy to forget calling .bind() on a method especially when the rest of the binding block doesn't depend on the return result of this method (eg a Result<Unit, Error> fire and forget call):
binding {
val a = getSomeValue().bind()
saveValue(a) // forgot .bind() here
doSomethingElse(a).bind()
}
It would be very helpful if we provided an out of the box Detekt rule to catch this, similar to how Arrow has it implemented here.
The text was updated successfully, but these errors were encountered:
Seems like a good idea. I wonder if there are any other Detekt rules worth writing for the library? Is there good documentation on how you write a Detekt rule + plug it in?
It's very easy to forget calling
.bind()
on a method especially when the rest of thebinding
block doesn't depend on the return result of this method (eg aResult<Unit, Error>
fire and forget call):It would be very helpful if we provided an out of the box Detekt rule to catch this, similar to how Arrow has it implemented here.
The text was updated successfully, but these errors were encountered: