Skip to content
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

Merged
merged 3 commits into from
Jan 31, 2024

Conversation

clairemcginty
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5c112ff) 62.63% compared to head (cbd11fb) 62.64%.

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.
📢 Have feedback on the report? Share it here.

Comment on lines +35 to +40
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)
Copy link
Contributor

@RustedBones RustedBones Jan 30, 2024

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.

Copy link
Contributor Author

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

@RustedBones RustedBones marked this pull request as ready for review January 30, 2024 16:16
@RustedBones RustedBones merged commit 994aff3 into main Jan 31, 2024
12 checks passed
@RustedBones RustedBones deleted the logical-type-scalafix branch January 31, 2024 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants