Skip to content

Commit

Permalink
Add scalafmt configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
travisbrown committed Nov 9, 2018
1 parent d2d200c commit f976902
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .scalafmt.conf
@@ -0,0 +1,9 @@
continuationIndent.defnSite = 2
docstrings = JavaDoc
includeCurlyBraceInSelectChains = false
maxColumn = 120
newlines.alwaysBeforeElseAfterCurlyIf = false
newlines.alwaysBeforeMultilineDef = false
optIn.breakChainOnFirstMethodDot = false
spaces.inImportCurlyBraces = true

6 changes: 4 additions & 2 deletions build.sbt
Expand Up @@ -561,14 +561,16 @@ lazy val CompileTime = config("compile-time")
val jvmTestProjects = jvmProjects.filterNot(Set(core, jawn, parser)) val jvmTestProjects = jvmProjects.filterNot(Set(core, jawn, parser))
val jsTestProjects = jsProjects.filterNot(Set(core, parser, scalajs)) val jsTestProjects = jsProjects.filterNot(Set(core, parser, scalajs))


val formatCommands = ";scalafmtCheck;test:scalafmtCheck;scalafmtSbtCheck;scalastyle"

addCommandAlias("buildJVM", jvmProjects.map(";" + _.id + "/compile").mkString) addCommandAlias("buildJVM", jvmProjects.map(";" + _.id + "/compile").mkString)
addCommandAlias( addCommandAlias(
"validateJVM", "validateJVM",
";buildJVM" + jvmTestProjects.map(";" + _.id + "/test").mkString + ";scalastyle" ";buildJVM" + jvmTestProjects.map(";" + _.id + "/test").mkString + formatCommands
) )
addCommandAlias("buildJS", jsProjects.map(";" + _.id + "/compile").mkString) addCommandAlias("buildJS", jsProjects.map(";" + _.id + "/compile").mkString)
addCommandAlias( addCommandAlias(
"validateJS", "validateJS",
";buildJS" + jsTestProjects.map(";" + _.id + "/test").mkString + ";scalastyle" ";buildJS" + jsTestProjects.map(";" + _.id + "/test").mkString + formatCommands
) )
addCommandAlias("validate", ";validateJVM;validateJS") addCommandAlias("validate", ";validateJVM;validateJS")
1 change: 1 addition & 0 deletions project/plugins.sbt
Expand Up @@ -2,6 +2,7 @@ addSbtCoursier
addSbtPlugin("com.47deg" % "sbt-microsites" % "0.7.24") addSbtPlugin("com.47deg" % "sbt-microsites" % "0.7.24")
addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.1.3") addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.1.3")
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.2") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.2")
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.6.0-RC4")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.10") addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.10")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.3.0") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.3.0")
Expand Down

0 comments on commit f976902

Please sign in to comment.