wartremover
wartremover copied to clipboard
type class implicit conversions trigger `ImplicitConversion`
This is perhaps more of a question than an issue …
the ImplicitConversion
wart triggers (understandably) on conversions used by type classes to “inject” operations. Wondering what the right approach is:
-
@SuppressWarnings
on those conversions, - somehow get WartRemover to be able to differentiate those implicit conversions from other implicit conversions (this seems nice, but potentially impossible), or
- take some other approach to using type class operations.
I think the “issue” here is maybe adding something about this in the README.
In my opinion, it is absolutely normal to disable the wart in this case.
Also see #242
Personally I try to use implicit class
in this case which should not trigger the wart. I do understand that there are limitations to this approach but I cannot think of a general rule that can identify "proper" implicit conversions that mimic implicit class
.
Somehow I missed these comments. Thanks for the clarification. I think the implicit class
recommendation should be mentioned in the README (I’ll probably submit a PR for that shortly).