diff --git a/README.md b/README.md index d0f80ff..f02b235 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,12 @@ Solutions for exercises in the book "Science of functional programming" Solutions for each chapter is a submodule in this project. Common code may be put into the `common` submodule. + +# Code formatting + +The GitHub job will verify that all code is properly formatted. + +To reformat code, run the script: + +`bash reformat_all_code.sh` + diff --git a/build.sbt b/build.sbt index a9cfa59..5408d57 100644 --- a/build.sbt +++ b/build.sbt @@ -5,9 +5,7 @@ val scalaV = scala2V val munitTest = "org.scalameta" %% "munit" % "0.7.29" % Test def munitFramework = new TestFramework("munit.Framework") - -val assertVerboseTest = "com.eed3si9n.expecty" %% "expecty" % "0.16.0" % Test - +val assertVerboseTest = "com.eed3si9n.expecty" %% "expecty" % "0.16.0" % Test lazy val root = (project in file(".")) .settings(scalaVersion := scalaV, crossScalaVersions := Seq(scalaV), name := "sofp-solutions-root") @@ -21,10 +19,7 @@ lazy val chapter01 = (project in file("chapter01")) Test / fork := false, scalafmtFailOnErrors := false, testFrameworks += munitFramework, - libraryDependencies ++= Seq( - munitTest, - assertVerboseTest, - ), + libraryDependencies ++= Seq(munitTest, assertVerboseTest), ).dependsOn(common) lazy val chapter02 = (project in file("chapter02")) @@ -35,22 +30,15 @@ lazy val chapter02 = (project in file("chapter02")) Test / fork := false, scalafmtFailOnErrors := false, testFrameworks += munitFramework, - libraryDependencies ++= Seq( - munitTest, - assertVerboseTest, - ), + libraryDependencies ++= Seq(munitTest, assertVerboseTest), ).dependsOn(common) -lazy val common = (project in file("common")) - .settings( - scalaVersion := scalaV, - crossScalaVersions := Seq(scala2V, scala3V), - Test / parallelExecution := true, - Test / fork := false, - scalafmtFailOnErrors := false, - testFrameworks += munitFramework, - libraryDependencies ++= Seq( - munitTest, - assertVerboseTest, - ), - ) +lazy val common = (project in file("common")).settings( + scalaVersion := scalaV, + crossScalaVersions := Seq(scala2V, scala3V), + Test / parallelExecution := true, + Test / fork := false, + scalafmtFailOnErrors := false, + testFrameworks += munitFramework, + libraryDependencies ++= Seq(munitTest, assertVerboseTest), +)