aboutsummaryrefslogtreecommitdiff
path: root/examples/scalafmt-example/src
diff options
context:
space:
mode:
authorNikolay Tatarinov <5min4eq.unity@gmail.com>2016-06-24 02:48:45 +0300
committerJan Christopher Vogt <oss.nsp@cvogt.org>2016-06-23 19:48:45 -0400
commit2cbc42fd0809b60b1ee2116657d18b3f44f8aef1 (patch)
treee894a040137e591c4a7664b7353d709298a44f65 /examples/scalafmt-example/src
parent75c32537cd8f29f9d12db37bf06ad942806f0239 (diff)
downloadcbt-2cbc42fd0809b60b1ee2116657d18b3f44f8aef1.tar.gz
cbt-2cbc42fd0809b60b1ee2116657d18b3f44f8aef1.tar.bz2
cbt-2cbc42fd0809b60b1ee2116657d18b3f44f8aef1.zip
Scalafmt plugin implementation (#156)
* scalariform: improve logging, declare tasks final * scalafmt plugin implementation * add scalafmt and scalariform plugins and examples to tests * fix logging guarded logging behaviour * add notes about formatting check to README * fix compilation error in examples
Diffstat (limited to 'examples/scalafmt-example/src')
-rw-r--r--examples/scalafmt-example/src/Main.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/scalafmt-example/src/Main.scala b/examples/scalafmt-example/src/Main.scala
new file mode 100644
index 0000000..595cede
--- /dev/null
+++ b/examples/scalafmt-example/src/Main.scala
@@ -0,0 +1,16 @@
+import scala.concurrent.{Await, Future}
+import scala.concurrent.duration._
+
+object Main extends App {
+ println("fooo")
+ val futureRes = Await.result(Future.successful(1), 5.seconds)
+ List(1, 2, 4, 5, 6) match {
+ case h :: _ => println("not empty list")
+ case Nil => println("empty list")
+ }
+
+ List(1 -> 2, 2 -> 3, 3 -> 4) match {
+ case (1, 2) :: _ => 90 -> 1
+ case (22, 44) :: _ => 1 -> 150
+ }
+}