Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
refactor(formatting-logging): reformat scala code and change logging …
…policy (DEV-839) (#2051)

* refactor: reduce logging noise

* refactor(scalafmt): align.preset most instead of some
  • Loading branch information
BalduinLandolt committed Apr 26, 2022
1 parent 0389e52 commit 5e4e914
Show file tree
Hide file tree
Showing 258 changed files with 16,816 additions and 15,711 deletions.
2 changes: 1 addition & 1 deletion .scalafmt.conf
@@ -1,6 +1,6 @@
version = "2.7.5"
maxColumn = 120
align.preset = some
align.preset = most
align.multiline = false
continuationIndent.defnSite = 2
assumeStandardLibraryStripMargin = true
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Expand Up @@ -138,7 +138,7 @@ lazy val webapi: Project = Project(id = "webapi", base = file("webapi"))
}, // allows sbt-javaagent to work with sbt-revolver
reStart / javaOptions ++= webapiJavaRunOptions,
javaAgents += Dependencies.aspectjweaver,
fork := true, // run tests in a forked JVM
fork := true, // run tests in a forked JVM
Test / testForkedParallel := false, // run forked tests in parallel
Test / parallelExecution := false, // run non-forked tests in parallel
// Global / concurrentRestrictions += Tags.limit(Tags.Test, 1), // restrict the number of concurrently executing tests in all projects
Expand Down
6 changes: 3 additions & 3 deletions dsp-api-main/src/main/scala/dsp/api/main/MainApp.scala
Expand Up @@ -8,10 +8,10 @@ object MainApp extends ZIOAppDefault {
val effect: ZIO[Console with SchemaRepo, Nothing, Unit] =
for {
profile <- SchemaRepo.lookup("user1").orDie
_ <- printLine(profile).orDie
_ <- printLine(42).orDie
_ <- printLine(profile).orDie
_ <- printLine(42).orDie
} yield ()

val mainApp: ZIO[Any, Nothing, Unit] = effect.provide(Console.live ++ SchemaRepoLive.layer)
def run: ZIO[Any, Nothing, Unit] = mainApp
def run: ZIO[Any, Nothing, Unit] = mainApp
}
27 changes: 16 additions & 11 deletions project/plugins.sbt
Expand Up @@ -6,22 +6,27 @@ resolvers ++= Seq(
addDependencyTreePlugin

// Knora
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.2")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.9")
addSbtPlugin("io.kamon" % "sbt-aspectj-runner" % "1.1.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.2")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.9")
addSbtPlugin("io.kamon" % "sbt-aspectj-runner" % "1.1.1")

// webapi
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.1")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")
addSbtPlugin("com.lightbend.sbt" % "sbt-javaagent" % "0.1.5")
addSbtPlugin("io.gatling" % "gatling-sbt" % "2.2.2")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("com.codacy" % "sbt-codacy-coverage" % "1.3.15")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.1")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")
addSbtPlugin("com.lightbend.sbt" % "sbt-javaagent" % "0.1.5")
addSbtPlugin("io.gatling" % "gatling-sbt" % "2.2.2")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("com.codacy" % "sbt-codacy-coverage" % "1.3.15")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")

// ad-hoc plugins - uncomment on demenad and keep it commented out in main branch

// https://github.com/rtimush/sbt-updates
// addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.1")

// https://github.com/cb372/sbt-explicit-dependencies
// addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16")

// https://scalameta.org/scalafmt/docs/installation.html#sbt
// addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")