Skip to content

Commit

Permalink
Automated source formatting using sbt-scalariform
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrzewski committed Feb 22, 2016
1 parent bf5a26c commit 0406ab6
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
13 changes: 12 additions & 1 deletion build.sbt
@@ -1,9 +1,20 @@
scalaVersion := "2.11.7"

import com.typesafe.sbt.SbtScalariform.ScalariformKeys

val scalariformPrefs = {
import java.util.Properties
import scalariform.formatter.preferences._
val props = new Properties()
IO.load(props, file("scalariform.properties"))
PreferencesImporterExporter.getPreferences(props)
}

lazy val commonSettings = Seq(
version := "0.1.0",
organization := "pl.caltha",
scalaVersion := "2.11.7"
scalaVersion := "2.11.7",
ScalariformKeys.preferences := scalariformPrefs
)

val akkaVersion = "2.4.2"
Expand Down
4 changes: 3 additions & 1 deletion project/plugins.sbt
Expand Up @@ -11,4 +11,6 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.7")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-gzip" % "1.0.0")

addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2")

addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.6.0")
22 changes: 22 additions & 0 deletions scalariform.properties
@@ -0,0 +1,22 @@
alignParameters=true
alignSingleLineCaseStatements=false
alignSingleLineCaseStatements.maxArrowIndent=40
compactControlReadability=false
compactStringConcatenation=false
danglingCloseParenthesis=prevent
doubleIndentClassDeclaration=true
formatXml=true
indentLocalDefs=false
indentPackageBlocks=true
indentSpaces=2
indentWithTabs=false
multilineScaladocCommentsStartOnFirstLine=false
placeScaladocAsterisksBeneathSecondAsterisk=true
preserveDanglingCloseParenthesis=false
preserveSpaceBeforeArguments=false
rewriteArrowSymbols=true
spacesAroundMultiImports=false
spaceBeforeColon=false
spaceInsideBrackets=false
spaceInsideParentheses=false
spacesWithinPatternBinders=true

0 comments on commit 0406ab6

Please sign in to comment.