diff --git a/.scalafmt.conf b/.scalafmt.conf new file mode 100644 index 0000000..0cf1ba1 --- /dev/null +++ b/.scalafmt.conf @@ -0,0 +1,11 @@ +project.git = true + +maxColumn = 120 +docstrings = JavaDoc + +align = true +align.openParenCallSite = false +align.openParenDefnSite = false +continuationIndent.callSite = 2 +continuationIndent.defnSite = 2 +danglingParentheses = true diff --git a/build.sbt b/build.sbt index 9531cd5..dadd196 100644 --- a/build.sbt +++ b/build.sbt @@ -17,6 +17,8 @@ version := GitBucketVersion scalaVersion := "2.12.5" +scalafmtOnCompile := true + // dependency settings resolvers ++= Seq( Classpaths.typesafeReleases, @@ -25,6 +27,7 @@ "sonatype-snapshot" at "https://oss.sonatype.org/content/repositories/snapshots/", "amateras-snapshot" at "http://amateras.sourceforge.jp/mvn-snapshot/" ) + libraryDependencies ++= Seq( "org.eclipse.jgit" % "org.eclipse.jgit.http.server" % "4.11.0.201803080745-r", "org.eclipse.jgit" % "org.eclipse.jgit.archive" % "4.11.0.201803080745-r", diff --git a/project/plugins.sbt b/project/plugins.sbt index a2e9993..3240439 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,6 @@ scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") +addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.4.0") addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.3.13") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5") //addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.0.0")