Skip to content

Commit

Permalink
Update scalafmt to newest (close #173)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeindykiewicz committed Aug 25, 2020
1 parent 5e923e1 commit 37b21cb
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 29 deletions.
23 changes: 13 additions & 10 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
version = "2.6.4"
style = default
align = some
maxColumn = 120
docstrings = JavaDoc
optIn.breakChainOnFirstMethodDot = true
spaces.afterKeywordBeforeParen = true
optIn.breakChainOnFirstMethodDot = false
assumeStandardLibraryStripMargin = true
align = most
align.tokens.add = ["|", "!", "!!", "||", "=>", "=", "->", "<-", "|@|", "//", "/", "+", "%", "%%"]
continuationIndent.defnSite = 2
importSelectors = noBinPack
rewrite.rules = [
AsciiSortImports,
RedundantBraces,
RedundantParens,
PreferCurlyFors
]
align.tokens = ["|", "!", "!!", "||", "=>", "=", "->", "<-", "|@|", "//", "/", "+"]
AvoidInfix,
PreferCurlyFors,
RedundantBraces,
RedundantParens,
SortModifiers
]
project.git = true
includeNoParensInSelectChains = true
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
- secure: hDo2jt06gx02utmCMb548NEeTAtIgTg53SYL+rPydhryCZHzQISPHlHB/SDKATlalYU6nP+1zz9gANA1HVgN83BaAzI82CoBcsBvVSAw+MKYMDbdf3yoEpe0DJyzibscu57nb7rvi+Xswse93mib1wkdy4eOXB1L0YwKW6dlxB0=
- secure: xtx+EvI6UKAndt1/9pay+YA+6QG8TylETGQemDMGENTp2er/u013CPTZRrJu7znRiQdPamI8hPsy1GRGKt7cCoyFIv5MWtMOodNVcxbhDbl7z3j5mcKIp2RJmv1XaL0nJnltnIJj0P0ohA4BVzpi9jthaj+WzI9O6OIKRyuIvdU=
script:
- sbt ++$TRAVIS_SCALA_VERSION coverage test coverageReport
- sbt ++$TRAVIS_SCALA_VERSION scalafmtCheckAll scalafmtSbtCheck coverage test coverageReport
deploy:
skip_cleanup: true
provider: script
Expand Down
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
* limitations there under.
*/

lazy val root = project.in(file("."))
lazy val root = project
.in(file("."))
.enablePlugins(ScalaUnidocPlugin, GhpagesPlugin)
.settings(
name := "scala-forex",
version := "0.7.0",
name := "scala-forex",
version := "0.7.0",
description := "High-performance Scala library for performing currency conversions using Open Exchange Rates"
)
.settings(BuildSettings.buildSettings)
.settings(BuildSettings.publishSettings)
.settings(BuildSettings.formattingSettings)
.settings(BuildSettings.docsSettings)
.settings(
libraryDependencies ++= Seq(
Expand Down
19 changes: 6 additions & 13 deletions project/BuildSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ import Keys._
import bintray.BintrayPlugin._
import bintray.BintrayKeys._

// Scalafmt
import org.scalafmt.sbt.ScalafmtPlugin.autoImport._

// Docs
import sbtunidoc.ScalaUnidocPlugin.autoImport._
import com.typesafe.sbt.site.SitePlugin.autoImport._
Expand All @@ -31,8 +28,8 @@ object BuildSettings {

// Basic settings for our app
lazy val buildSettings = Seq[Setting[_]](
organization := "com.snowplowanalytics",
scalaVersion := "2.12.8",
organization := "com.snowplowanalytics",
scalaVersion := "2.12.8"
)

// Publish settings
Expand All @@ -45,10 +42,10 @@ object BuildSettings {
bintrayRepository := "snowplow-maven",
pomIncludeRepository := { _ => false },
homepage := Some(url("http://snowplowanalytics.com")),
scmInfo := Some(ScmInfo(url("https://github.com/snowplow/scala-forex"),
"scm:[email protected]:snowplow/scala-forex.git")),
pomExtra := (
<developers>
scmInfo := Some(
ScmInfo(url("https://github.com/snowplow/scala-forex"), "scm:[email protected]:snowplow/scala-forex.git")
),
pomExtra := (<developers>
<developer>
<name>Snowplow Analytics Ltd</name>
<email>support@snowplowanalytics.com</email>
Expand All @@ -58,10 +55,6 @@ object BuildSettings {
</developers>)
)

lazy val formattingSettings = Seq(
scalafmtOnCompile := true
)

lazy val docsSettings = Seq(
addMappingsToSiteDir(mappings in (ScalaUnidoc, packageDoc), siteSubdirName in ScalaUnidoc),
gitRemoteRepo := "https://github.com/snowplow/scala-forex.git",
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4")
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.5.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.3.2")
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.2")
Expand Down

0 comments on commit 37b21cb

Please sign in to comment.