-
Notifications
You must be signed in to change notification settings - Fork 22
Conversation
* `groupedImports = Merge` to prevent conflict with IntelliJ * `expandRelative = true` to make converging with IntelliJ's _Optimize imports_ faster
Codecov Report
@@ Coverage Diff @@
## master #146 +/- ##
=======================================
Coverage 90.90% 90.90%
=======================================
Files 4 4
Lines 242 242
Branches 12 12
=======================================
Hits 220 220
Misses 22 22
Continue to review full report at Codecov.
|
|
||
import sun.misc.BASE64Encoder | ||
|
||
import util.control | ||
import control.NonFatal | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change violates the original motivation of the test. It meant to test whether relative imports are grouped in a separate order-preserving group, but now they are expanded.
To avoid such issues, let's not change any output files but update the OrganizeImports
configurations in all the input files to reflect the new default configuration values.
Thanks, @sideeffffect. I left a comment about the changes in the tests, otherwise LGTM. I'm afraid we won't be able to be 100% compatible with IntelliJ default configurations.
The above configuration is equivalent to With that said, changes proposed in this PR are safe, though. |
Oh, actually, another issue: defaulting I'm not quite sure whether it's a good idea to enable it by default. Maybe leaving it disabled by default is fine? Because in that case, |
I'm thinking maybe we can add a OrganizeImports.basedOnStyle = INTELLIJ_2020_3 implies: OrganizeImports {
coalesceToWildcardImportThreshold = 5
groups = [
"*",
"re:(javax?|scala)\\."
]
groupedImports = Merge
} Users can still override individual options. |
I've changed default While in the future it may turn out handy to have a |
Thanks and merged! |
groupedImports = Merge
to prevent conflict with IntelliJexpandRelative = true
to make converging with IntelliJ's Optimize imports fasterMaybe there are other changes necessary to match IntelliJ 100%, but from my experience over many months, using
doesn't cause any conflicts between IntelliJ and
scalafix-organize-imports
.