-
Notifications
You must be signed in to change notification settings - Fork 87
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
scalafix can't find 'RoughlyMapValues' #517
Comments
@sjrd the scalafix rules in this repo were developed at the Center; is there someone there who would like to take a look at this...? |
@mlachkar Are you familiar with the above rule and/or why it is not found? |
The rules provided by
So there is no rule called The easiest way to run those rules is to add scalafix in your plugin list
then add the dependency to this rule in your build:
And then add them to the configuration of scalafix:
And then launch sbt shell, and run You can also run with scalafix command through sbt shell
Tell me if you need more help! |
Hi @mlachkar, I've tried running scalafix with Collection213Roughly (doc states that it fixes "Stream is replaced with LazyList"), it runs successfully, but it doesn't fix any of the mapValues lines of code. |
relevant: #107 |
can it be that https://github.com/scala/scala-collection-compat/blob/main/scalafix/rules/src/main/scala/scala/fix/collection/Collection213Roughly.scala |
Sounds plausible — do we have any test coverage for it? |
This one took me a while to solve. I guess the documentation is quite misleading: there is no such rule as Collection213Roughly.strictMapValues = true
Collection213Roughly.strictFilterKeys = true By default all the fixes are disabled somehow |
@olegbonar Thank you for looking into it! Would you be interested in submitting a PR that improves the documentation...? |
scalafix dependency:[email protected]:scala-collection-migrations:2.6.0
[error] (Compile / scalafix) scalafix.sbt.InvalidArgument: Unknown rule 'RoughlyMapValues'
This is how I setup my sbt.build file
The text was updated successfully, but these errors were encountered: