Skip to content

About

A scapegoat plugin for Mill build tool.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

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.2.0
import org.scalateams.mill.scapegoat.ScapegoatModule
import mill.scalalib.*

object project extends ScalaModule with ScapegoatModule {

  def scalaVersion     = "3.3.8"
  def scapegoatVersion = "3.3.6"
}
$ ./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:

mill-scapegoat injects the Scapegoat compiler plugin options by overriding def allScalacOptions: T[Seq[String]]. In the unlikely case that you override this method in your project, make sure to include super.allScalacOptions() or call scapegoatScalacOptions() directly so that the plugin options are preserved.

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

Related projects

Contributing

Before committing run:

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

All contributions are welcome!

About

A scapegoat plugin for Mill build tool.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Contributors

Languages