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

Integrate with scalafix in core sbt-typelevel plugin? #236

Closed
armanbilge opened this issue Mar 31, 2022 · 2 comments · Fixed by #283
Closed

Integrate with scalafix in core sbt-typelevel plugin? #236

armanbilge opened this issue Mar 31, 2022 · 2 comments · Fixed by #283
Milestone

Comments

@armanbilge
Copy link
Member

Spinning out of #37 (comment).

IIUC this would be very similar to our scalafmt integration:

  1. Add a dependency to the sbt-scalafix plugin
  2. Add the appropriate checks to CI
  3. Add the appropriate steps to the prePR command

Projects would then configure their .scalafix.conf as they see fit (or leave empty).
Examples:

https://github.com/typelevel/cats-effect/blob/4d8e933c64aec4cd42d3d7b9ab043705b638a0a9/.scalafix.conf

https://github.com/http4s/http4s/blob/18b0a95c36d44ea7a5a12ffc4121a9f6ba1f7eef/.scalafix.conf

@armanbilge
Copy link
Member Author

The very popular organize imports rule requires an additional dependency.

ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.5.0"

https://github.com/liancheng/scalafix-organize-imports

Tempting to add this dep automatically in our integration. Of course, the rule would only be activated if added to .scalafix.conf; otherwise, the dep just sits.

@armanbilge armanbilge added this to the v0.5.0 milestone Apr 11, 2022
@armanbilge
Copy link
Member Author

@armanbilge armanbilge linked a pull request May 17, 2022 that will close this issue
@armanbilge armanbilge modified the milestones: v0.5.0, v0.4.10 May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant