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

Add scalafix configuration for organizing imports #2875

Merged
merged 2 commits into from
May 9, 2023

Conversation

kciesielski
Copy link
Member

This configuration enables the "organize imports" action for Metals. I haven't changed the default settings too much, except setting groupedImports to Merge. This creates groups of imports if they are from the same package.

@kciesielski kciesielski force-pushed the scalafix-organize-imports branch from 289ca4c to 41ee5ab Compare May 8, 2023 15:07
@kciesielski kciesielski marked this pull request as ready for review May 8, 2023 15:07
@kciesielski kciesielski requested a review from adamw May 8, 2023 15:07
@adamw
Copy link
Member

adamw commented May 8, 2023

I'm a bit surprised though that any configuration is needed for such an obvious thing ;)

@kciesielski
Copy link
Member Author

Actually the organize imports action has a default configuration, but it doesn't merge types from the same package.
The groups (custom/scala/java) are actually in the default config as well, so I'm removing this and leaving only

 groupedImports = Merge

@kciesielski kciesielski merged commit 4d927fe into master May 9, 2023
@mergify mergify bot deleted the scalafix-organize-imports branch May 9, 2023 07:06
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

Successfully merging this pull request may close these issues.

2 participants