-
Notifications
You must be signed in to change notification settings - Fork 15
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
Import jumps on to comment line when there is a comment #26
Comments
This is funny, I was literally trying to reproduce something like this from memory the other day but had no luck. PRs welcome, otherwise I will get around to it whenever I have some free time. |
Sounds good! If I get a moment I'll take a look to see if it's something clear to me and easy to fix. |
@NeQuissimus |
Change /*
rule = SortImports
SortImports.blocks = [
"java",
"scala",
"*",
"com.sun"
]
*/
import scala.util._ // foobar
import scala.collection._
import java.util.Map
import com.oracle.net._
import com.sun.awt._
import java.math.BigInteger
/**
* Bla
*/
object Bla {
val foo = "Hello" // World
//comment between 1
import java.util.fucntion._
//comment between 2
import java.concurrent._
} can produce this |
@NeQuissimus you can check out |
Very cool @ckipp01 , looking forward to your fix, thanks for sharing. |
I more than likely won't get this fixed for a while. If anyone wants to work off what I had started, it's closed to being finished and the tests are there as well. My branch is here https://github.com/ckipp01/sort-imports/tree/comments |
Given the following code block, if you run scalafix it will cause the second import to jump up a line resulting in it being commented out.
It will become this:
The text was updated successfully, but these errors were encountered: