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

feature: Add scalafix run command and scalafix dependencies setting #1013

Merged
merged 1 commit into from
Jun 11, 2022

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Jun 7, 2022

For running scalafix I decided on using ctrl+alt+shift+o shortcut since it's one step from organize imports and should be pretty intuitive (do more than organize import so I add shift)

As for the dependency settings I was thinking about using an object first, but that would require each rule to have it's dependency (but there might be multiple rules in a single dep) and it's easier to represent an Array in the settings UI.

Related to scalameta/metals#3996

package.json Outdated
Comment on lines 252 to 253
"markdownDescription": "List of Scalafix rules dependencies in case they are not available by default in Metals. For example: `com.github.liancheng::organize-imports:0.6.0`, `::` indicates Scala dependency"
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't looked at metals' PR yet so I have a few questions arisen.

they are not available by default in Metals

How one can know if rule is available by default?

For example: com.github.liancheng::organize-imports:0.6.0, :: indicates Scala dependency

not sure how to understand the second part with ::

Copy link
Contributor Author

@tgodzik tgodzik Jun 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How one can know if rule is available by default?

We should probably list them somewhere 🤔

not sure how to understand the second part with ::

Maybe I tried exaplaining instead of just linking to the coursier convention.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Listing known rules is a good idea.

not sure how to understand the second part with ::

Maybe I tried exaplaining instead of just linking to the coursier convention.

OMG, now I realized what you meant 😂 I read Scala dependency and then interpreted :: a List member haha. It's probably better to provide link which explains what :: in the context of dependencies is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I modified the explanation a bit. I will add the list of built in rules later on, since I haven't yet added and community ones,

For running scalafix I decided on using `ctrl+alt+shift+o` shortcut since it's one step from organize imports and should be pretty intuitive (do more than organize import so I add shift)

As for the dependency settings I was thinking about using an object first, but that would require each rule to have it's dependency (but there might be multiple rules in a single dep) and it's easier to represent an Array in the settings UI.
@tgodzik tgodzik merged commit 723a3d7 into scalameta:main Jun 11, 2022
@tgodzik tgodzik deleted the run-all-rules branch June 11, 2022 12:19
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.

3 participants