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

addGlobalImport should group imports by ref #253

Closed
olafurpg opened this issue Jul 15, 2017 · 2 comments
Closed

addGlobalImport should group imports by ref #253

olafurpg opened this issue Jul 15, 2017 · 2 comments

Comments

@olafurpg
Copy link
Contributor

Currently it produces output like this

import scala.Predef.{ augmentString => _ }
import scala.Predef.{ intArrayOps => _ }
import scala.`package`.{ List => _ }
import scala.`package`.{ Vector => _ }
import scala.Predef.{ Map => _ }
import scala.`package`.{ :: => _ }
import scala.`package`.{ Seq => _ }
import scala.`package`.{ #:: => _ }
import strawman.collection.immutable.HashMap
import strawman.collection.immutable.Vector
import strawman.collection.immutable.Map
import strawman.collection.immutable.Nl
import strawman.collection.immutable.List
import strawman.collection.immutable.LazyList
import strawman.collection.mutable.ArrayBuffer

it would be nice if it grouped by shared prefix.

@gabro
Copy link
Collaborator

gabro commented Jul 15, 2017

Is this the same as #199?

@olafurpg
Copy link
Contributor Author

Close but there's a minor difference, those imports are inserted by scalafix with the ctx.addGlobalImport patch. If I understand correctly, the other rewrite is about grouping existing imports together which is a bit harder.

olafurpg added a commit to olafurpg/collection-strawman that referenced this issue Jul 15, 2017
olafurpg added a commit that referenced this issue Jul 18, 2017
Fix #253, add option to group inserted imports by ref.
olafurpg added a commit to olafurpg/collection-strawman that referenced this issue Aug 9, 2017
julienrf pushed a commit to scala/collection-strawman that referenced this issue Aug 29, 2017
olafurpg added a commit to olafurpg/collection-strawman that referenced this issue Aug 29, 2017
julienrf pushed a commit to julienrf/scala-collection-compat that referenced this issue Apr 19, 2018
bjaglin pushed a commit to liancheng/scalafix that referenced this issue May 23, 2023
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

No branches or pull requests

2 participants