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

RemoveUnusedImports: trailing whitespace #216

Closed
cvogt opened this issue Jun 13, 2017 · 5 comments
Closed

RemoveUnusedImports: trailing whitespace #216

cvogt opened this issue Jun 13, 2017 · 5 comments
Milestone

Comments

@cvogt
Copy link

cvogt commented Jun 13, 2017

-import scalaz.concurrent.{ Future, Task }
+import scalaz.concurrent.Task

Task is followed by a space.

@olafurpg
Copy link
Contributor

Thanks for reporting! This should be fixable, but note that RemoveUnusedImports does a best-effort only to preserve formatting. It's recommended to run formatter after the rewrite.

@olafurpg olafurpg changed the title trailing whitespace RemoveUnusedImports: trailing whitespace Jun 14, 2017
@gabro
Copy link
Collaborator

gabro commented Jun 14, 2017

I've also noticed this

-import scala.util.control.{ NonFatal, Breaks }
+import scala.util.control. NonFatal 

which is more annoying than the trailing whitespace.

@gabro
Copy link
Collaborator

gabro commented Jun 14, 2017

A very ad-hoc (but probably reasonable) solution would be to remove all surrounding whitespaces when removing the curly braces.

@olafurpg
Copy link
Contributor

I've been meaning to simplify the remove importee implementation. It shouldn't have to be this complicated.

@olafurpg olafurpg modified the milestone: v0.5 Jun 30, 2017
olafurpg added a commit that referenced this issue Jul 11, 2017
Fix #216, remove whitespace around removed curly braces.
@olafurpg
Copy link
Contributor

The bug did not surface in the tests since they used import a.{b,c} instead of import a.{ b, c }.

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

3 participants