diff options
Diffstat (limited to 'examples/wartremover-example')
-rw-r--r-- | examples/wartremover-example/build/build.scala | 9 | ||||
-rw-r--r-- | examples/wartremover-example/build/build/build.scala | 5 | ||||
-rw-r--r-- | examples/wartremover-example/src/Main.scala | 5 |
3 files changed, 19 insertions, 0 deletions
diff --git a/examples/wartremover-example/build/build.scala b/examples/wartremover-example/build/build.scala new file mode 100644 index 0000000..c715f20 --- /dev/null +++ b/examples/wartremover-example/build/build.scala @@ -0,0 +1,9 @@ +import cbt._ + +import org.wartremover.warts.{ Null, Var } +import org.wartremover.WartTraverser + +class Build(val context: Context) extends BuildBuild with WartRemover { + + override def wartremoverErrors: Seq[WartTraverser] = Seq(Var, Null) +} diff --git a/examples/wartremover-example/build/build/build.scala b/examples/wartremover-example/build/build/build.scala new file mode 100644 index 0000000..eb2f193 --- /dev/null +++ b/examples/wartremover-example/build/build/build.scala @@ -0,0 +1,5 @@ +import cbt._ + +class Build(val context: Context) extends BuildBuild { + override def dependencies = super.dependencies :+ plugins.wartremover +} diff --git a/examples/wartremover-example/src/Main.scala b/examples/wartremover-example/src/Main.scala new file mode 100644 index 0000000..dc4b3da --- /dev/null +++ b/examples/wartremover-example/src/Main.scala @@ -0,0 +1,5 @@ +object Main { + def main(args: Array[String]): Unit = { + var nastyVar = null + } +} |