-
Notifications
You must be signed in to change notification settings - Fork 7
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
TypelevelAs should add cats.syntax
import
#49
Comments
It does, if you do |
Oh, that is possible. I wonder if there is a good way to make that part of the message in such a situation maybe? My actual issue turned out to be that I had multiple |
Here's how an http4s scalafix adds an import if needed. typelevel-scalafix/modules/http4s/rules/src/main/scala/org/typelevel/fix/Http4sLiteralsSyntax.scala Lines 41 to 43 in 8e24638
|
Let's close this issue because there is no issue :) |
Actually there is an issue, the import is not being added :) |
cats.syntax
import
Right but you'd have to make the rule a lot more specific then, would you not? |
Good point. So even after adding the import, this Scalafix could still be suggesting broken code. Seems to me like another reason to keep it open. |
👍 I agree with that. This almost needs something like "do we have an implicit Functor? OK, just add the syntax" and otherwise bail out. |
The (WIP) port of the RemoveInstancesImport rule does something similar to that actually: https://github.com/typelevel/typelevel-scalafix/pull/31/files#diff-b2f050feb2124095e5835138e89f5f116e4781fc5aeb560ea4415dcf7f17f926R46 |
Version 0.1.5
The rule
TypelevelAs.as
will complain and suggest to rewrite themap
line to.void
.Resource
does not have avoid
method :)The check should probably be limited to types that provide the necessary functions.
The text was updated successfully, but these errors were encountered: