diff options
author | Stewart Stewart <stewinsalot@gmail.com> | 2016-10-10 18:46:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-10 18:46:58 -0400 |
commit | ceb918e633952d574b7df75069d0ba977f50c96b (patch) | |
tree | dc82d87516a9ef15610e79be1304704afce735ea | |
parent | b85ed80fe672f420ef789f0fa0c8078ae27d13de (diff) | |
parent | 186758c074655c6593323fc4e8de786d16b8568f (diff) | |
download | sbt-settings-ceb918e633952d574b7df75069d0ba977f50c96b.tar.gz sbt-settings-ceb918e633952d574b7df75069d0ba977f50c96b.tar.bz2 sbt-settings-ceb918e633952d574b7df75069d0ba977f50c96b.zip |
Merge pull request #5 from drivergroup/update-libraries
Update scalafmt
-rw-r--r-- | build.sbt | 2 | ||||
-rw-r--r-- | src/main/scala/com.drivergrp.sbt/SbtSettings.scala | 35 |
2 files changed, 20 insertions, 17 deletions
@@ -8,7 +8,7 @@ scalaVersion := "2.10.6" publishMavenStyle := true // Code style plugins -addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.2.10") +addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.4.5") addSbtPlugin("org.wartremover" % "sbt-wartremover" % "1.0.1") addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.8.0") diff --git a/src/main/scala/com.drivergrp.sbt/SbtSettings.scala b/src/main/scala/com.drivergrp.sbt/SbtSettings.scala index 746fb68..967fd7a 100644 --- a/src/main/scala/com.drivergrp.sbt/SbtSettings.scala +++ b/src/main/scala/com.drivergrp.sbt/SbtSettings.scala @@ -36,32 +36,35 @@ object SbtSettings extends AutoPlugin { """# scalafmt sbt plugin config |# refer to https://olafurpg.github.io/scalafmt/#Configuration for properties | - |--style defaultWithAlign # For pretty alignment. - |--maxColumn 120 # For my wide 30" display. + |style = defaultWithAlign # For pretty alignment. + |maxColumn = 120 # For my wide 30" display. | - |--reformatDocstrings true + |reformatDocstrings = true |--scalaDocs | - |--continuationIndentCallSite 4 - |--continuationIndentDefnSite 4 + |continuationIndent.callSite = 4 + |continuationIndent.defnSite = 4 | - |--rewriteTokens ⇒;=>,←;<- - |--danglingParentheses false - |--spaceAfterTripleEquals true - |--alignByArrowEnumeratorGenerator true - |--binPackParentConstructors true - |--allowNewlineBeforeColonInMassiveReturnTypes true - |--spacesInImportCurlyBraces false + |rewriteTokens: { + | "⇒" = "=>" + | "←" = "<-" + |} + |danglingParentheses = false + |spaces.afterTripleEquals = true + |alignByArrowEnumeratorGenerator = true + |binPack.parentConstructors = true + |newlines.sometimesBeforeColonInMethodReturnType = true + |spaces.inImportCurlyBraces = false | - |# --alignByOpenParenCallSite <value> - |# --alignByOpenParenDefnSite <value> + |# align.openParenCallSite = <value> + |# align.openParenDefnSite = <value> | """.stripMargin - val formatFile = file(".scalafmt") + val formatFile = file(".scalafmt.conf") IO.write(formatFile, contents) Seq(formatFile) }.taskValue, - scalafmtConfig in ThisBuild := Some(file(".scalafmt")), + scalafmtConfig in ThisBuild := Some(file(".scalafmt.conf")), testExecution in (Test, test) <<= (testExecution in (Test, test)) dependsOn (scalafmtTest in Compile, scalafmtTest in Test)) |