diff options
author | Ilya Kirillov <darthorimar@users.noreply.github.com> | 2017-03-18 15:42:33 +0300 |
---|---|---|
committer | Ilya Kirillov <darthorimar@users.noreply.github.com> | 2017-03-19 02:56:28 +0300 |
commit | 923fd231e0b2c22c0c60379da91066c0f544e83c (patch) | |
tree | 1f80e94e0f605453c769bb4e62ecb3b5d8cc836c /examples/scalafix-example | |
parent | b9c20082bcbd231eb67c3ded0d3fe6674c8c55b7 (diff) | |
download | cbt-923fd231e0b2c22c0c60379da91066c0f544e83c.tar.gz cbt-923fd231e0b2c22c0c60379da91066c0f544e83c.tar.bz2 cbt-923fd231e0b2c22c0c60379da91066c0f544e83c.zip |
Add scalafix plugin with example project and tests
Diffstat (limited to 'examples/scalafix-example')
-rw-r--r-- | examples/scalafix-example/.scalafix.conf | 9 | ||||
-rw-r--r-- | examples/scalafix-example/Main.scala | 9 | ||||
-rw-r--r-- | examples/scalafix-example/build/build.scala | 3 | ||||
-rw-r--r-- | examples/scalafix-example/build/build/build.scala | 5 |
4 files changed, 26 insertions, 0 deletions
diff --git a/examples/scalafix-example/.scalafix.conf b/examples/scalafix-example/.scalafix.conf new file mode 100644 index 0000000..dbb79d7 --- /dev/null +++ b/examples/scalafix-example/.scalafix.conf @@ -0,0 +1,9 @@ +rewrites = [ + ProcedureSyntax + ExplicitImplicit + VolatileLazyVal +] + +patches.addGlobalImports = [ + "scala.collection.immutable" +] diff --git a/examples/scalafix-example/Main.scala b/examples/scalafix-example/Main.scala new file mode 100644 index 0000000..c82c77b --- /dev/null +++ b/examples/scalafix-example/Main.scala @@ -0,0 +1,9 @@ +object Main{ + lazy val x = 1 + 1 + + implicit def toString(i :Int) = i.toString + + def main( args: Array[String] ){ + println("Hello world!") + } +} diff --git a/examples/scalafix-example/build/build.scala b/examples/scalafix-example/build/build.scala new file mode 100644 index 0000000..776d1e0 --- /dev/null +++ b/examples/scalafix-example/build/build.scala @@ -0,0 +1,3 @@ +import cbt._ + +class Build(val context: Context) extends BaseBuild with Scalafix diff --git a/examples/scalafix-example/build/build/build.scala b/examples/scalafix-example/build/build/build.scala new file mode 100644 index 0000000..404356f --- /dev/null +++ b/examples/scalafix-example/build/build/build.scala @@ -0,0 +1,5 @@ +import cbt._ + +class Build(val context: Context) extends BuildBuild { + override def dependencies = super.dependencies :+ plugins.scalafix +} |