We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A simple source with TravesableOnce results in a strange IterableOnceIterableOnce identifier (the correct identifier is repeated twice):
TravesableOnce
IterableOnceIterableOnce
package com.github.ondrejspanel.scafi object TraversableOnce { def shuffle[T](random: scala.util.Random, src: TraversableOnce[T]): List[T] = { src.foldLeft(List.empty[T]) { (list, item) => val len = list.length val index = (random.nextDouble() * (len + 1)).toInt list.patch(index, List(item), 0) } } }
Using scalafix Collection213Upgrade was rewritten as:
scalafix Collection213Upgrade
package com.github.ondrejspanel.scafi import scala.IterableOnce object TraversableOnce { def shuffle[T](random: scala.util.Random, src: IterableOnceIterableOnce[T]): List[T] = { src.foldLeft(List.empty[T]) { (list, item) => val len = list.length val index = (random.nextDouble() * (len + 1)).toInt list.patch(index, List(item), 0) } } }
Complete project available at https://github.com/OndrejSpanel/ScalaFixSimple
The text was updated successfully, but these errors were encountered:
Note that this is only a "good first issue" for those with an interest in working on the Scalafix rules, as opposed to the main part of the library.
Sorry, something went wrong.
No branches or pull requests
A simple source with
TravesableOnce
results in a strangeIterableOnceIterableOnce
identifier (the correct identifier is repeated twice):Using
scalafix Collection213Upgrade
was rewritten as:Complete project available at https://github.com/OndrejSpanel/ScalaFixSimple
The text was updated successfully, but these errors were encountered: