I'd like to run automatically the scapegoat inspections each time a SBT build is run.
I'm trying to this that way as I did the same for scalastyle,
lazy val compileScapegoatTask = taskKey[Unit]("scapegoat")
Compile / compile := (Compile / compile)
.dependsOn(compileScapegoatTask)
.value
But when I run sbt compile it gets stuck , maybe is it causing an infinite loop / cycle in the dependency graph.
Is there a better way to achieve this?
Thanks