You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sbt-scalafix would always execute callbacks registered in the task key scalafixHooks
when both scalafmtOnCompile := true &&scalafixOnCompile := true, sbt-scalafmt wouldn't run scalafmt before compile, but instead in scalafixHooks (which would be "fed" via a dynamic task)
The text was updated successfully, but these errors were encountered:
bjaglin
changed the title
Better coordination between sbt-scalafmt & sbt-scalafix when scalafxxOnCompile
Better coordination between sbt-scalafmt & sbt-scalafix when scalaf..OnCompile := true
Jul 10, 2020
I think it's also worth exploring another approach where we have a scalafmt rule that formats the code and we extend .scalafmt.conf to support running scalafix in several independent steps. This shouldn't be too hard to support when combined with #1204
If I get it right, your idea is integrate scalafmt into scalafix (and potentially scalafix into scalafmt, although that sounds redundant?), in the core rather than in the sbt plugins.
I'll start exploring the idea of exposing a special built-in Scalafmt scalafix rule backed by scalafmt-dynamic, that would after all patches are applied.
sbt-scalafix should include .scalafix.conf in the cache checksum to avoid
sbt-scalafix could detect the presence of sbt-scalafmt in the classpath via task introspection and suggest using that rule for better results (which was the starting point of this ticket)
Expanding on @olafurpg 's idea:
scalafixHooks
scalafmtOnCompile := true
&&scalafixOnCompile := true
, sbt-scalafmt wouldn't run scalafmt before compile, but instead inscalafixHooks
(which would be "fed" via a dynamic task)The text was updated successfully, but these errors were encountered: