-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Since I don't know much about scalafix not sure how hard, or even impossible, this will be...
But, it would be great to warn / error if someone tries to leak a Resource using pure or delay inside use; which is a somewhat common beginner mistake.
Maybe a best effort that tries to catch common variations like ra.use(a => a.pure[F]) or ra.use(IO.apply) can be enough?
Another idea would be to warn if use returns an F[A] rather than some F[B] (meaning the same type of the Resource), since on the surface it seems that would never be a good idea; but I may be being too naive.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels