-
Notifications
You must be signed in to change notification settings - Fork 513
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
Add Scalafix rule for LogicalTypeSupplier removal #5178
Conversation
scalafix/input-0_14/src/main/scala/fix/v0_14_0/FixLogicalTypeSuppliers.scala
Show resolved
Hide resolved
scalafix/rules/src/main/scala/fix/v0_14_0/FixLogicalTypeSupplier.scala
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5178 +/- ##
=======================================
Coverage 62.63% 62.64%
=======================================
Files 301 301
Lines 10845 10845
Branches 768 768
=======================================
+ Hits 6793 6794 +1
+ Misses 4052 4051 -1 ☔ View full report in Codecov by Sentry. |
3bec089
to
cbd11fb
Compare
term.symbol.info | ||
.map(_.signature) | ||
.collect { case MethodSignature(_, _, returnedType) => returnedType } | ||
.collect { case TypeRef(_, sym, tpe :: Nil) if JavaClassMatcher.matches(sym) => tpe } | ||
.collect { case TypeRef(_, sym, _) => sym } | ||
.exists(LogicalTypeSupplierMatcher.matches) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works when class is stored in a val.
Unfortunately for this shift, since the type is removed, the val needs to also go away but that's kind of hard to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I didn't try to implement that due to the complexity
No description provided.