GitHunt
SC

scalateams/mill-scapegoat

A scapegoat plugin for Mill build tool.

mill-scapegoat

CI passing badge Maven Central version badge Scaladoc badge Scala Steward helping badge GitHub stars badge

A scapegoat plugin for Mill build tool.

Usage

build.mill:

//| mvnDeps:
//| - org.scalateams::mill-scapegoat::0.1.0
import org.scalateams.mill.scapegoat.ScapegoatModule
import mill.scalalib.*

object project extends ScalaModule with ScapegoatModule {

  def scalaVersion     = "3.3.7"
  def scapegoatVersion = "3.2.4"
}
$ ./mill project.compile
Compiling compiler interface...
...
[warn] /project/project/src/MyClass.scala:6:9: local var who in method main is never updated: consider using immutable val
[warn]     var who = "world"
[warn]         ^
[info] [scapegoat] 123 activated inspections
[warn] [scapegoat] Analysis complete: 1 files - 0 errors 1 warns 0 infos
[info] [scapegoat] Written HTML report [out/scapegoatOutput.dest/scapegoat.html]
...
done compiling

Overriding Scala compiler options:

Make sure you include super.scalacOptions() or scapegoatScalacOptions() directly when overriding scalacOptions so that plugins options are included.

override def scalacOptions = super.scalacOptions() ++ Seq("some", "options")

Contributing

Before committing run:

$ ./mill __.style + __.test + __.publishLocal

All contributions are welcome!

Languages

Scala43.4%Batchfile33.8%Shell22.7%

Contributors

Apache License 2.0
Created January 13, 2026
Updated March 20, 2026