Skip to content

Commit

Permalink
fix: make sure sbt-related files are also checked for formatting (#245)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Loots <eric.loots@gmail.com>
  • Loading branch information
ckipp01 and eloots authored Jul 20, 2023
1 parent fdbc8aa commit 0f94312
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Check code formatting
run: |
cd CMT &&
sbt scalafmtCheckAll
sbt "scalafmtCheckAll ; scalafmtSbtCheck"
- name: Run tests
run: |
Expand Down
13 changes: 5 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ lazy val `course-management-tools` =
.settings(commonSettings: _*)
.settings(publish / skip := true)

lazy val core = project.in(file("core"))
.settings(commonSettings: _*)
.settings(libraryDependencies ++= Dependencies.coreDependencies)
lazy val core =
project.in(file("core")).settings(commonSettings: _*).settings(libraryDependencies ++= Dependencies.coreDependencies)

lazy val cmta = project
.in(file("cmta"))
Expand All @@ -29,16 +28,14 @@ lazy val cmtc = project
.settings(Compile / mainClass := Some("com.lunatech.cmt.client.Main"))
.settings(buildInfoKeys := buildKeysWithName("Course Management Tools (Client)"))

lazy val `functional-tests` = project.in(file("functional-tests"))
lazy val `functional-tests` = project
.in(file("functional-tests"))
.dependsOn(cmta, cmtc, core)
.settings(commonSettings: _*)
.settings(libraryDependencies ++= Dependencies.functionalTestDependencies)
.settings(publish / skip := true)

lazy val docs = project
.in(file("course-management-tools-docs"))
.settings(
moduleName := "course-management-tools-docs",
publish / skip := true
)
.settings(moduleName := "course-management-tools-docs", publish / skip := true)
.enablePlugins(MdocPlugin, DocusaurusPlugin)
3 changes: 1 addition & 2 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ object Build {
"-Wunused:explicits",
"-Wunused:implicits",
"-Wunused:params",
"-Wvalue-discard",
)
"-Wvalue-discard")
}

lazy val commonSettings = Seq(
Expand Down
18 changes: 14 additions & 4 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ object Library {
"org.http4s" %% "http4s-dsl",
"org.http4s" %% "http4s-blaze-server",
"org.http4s" %% "http4s-blaze-client",
"org.http4s" %% "http4s-circe"
).map(_ % Version.http4s)
"org.http4s" %% "http4s-circe").map(_ % Version.http4s)

lazy val circe = "io.circe" %% "circe-generic" % Version.circe
lazy val github4s = "com.47deg" %% "github4s" % Version.github4s
Expand All @@ -40,8 +39,19 @@ object Dependencies {

import Library._

lazy val coreDependencies = (http4s ++ List(sbtio, typesafeConfig, scalaTest, scalaCheck, commonsCodec, caseapp, cats, devDirs, circe, github4s)).map(_.withSources())
lazy val cmtDependencies = List(sbtio, typesafeConfig, scalaTest, scalaCheck, commonsCodec, caseapp, cats).map(_.withSources())
lazy val coreDependencies = (http4s ++ List(
sbtio,
typesafeConfig,
scalaTest,
scalaCheck,
commonsCodec,
caseapp,
cats,
devDirs,
circe,
github4s)).map(_.withSources())
lazy val cmtDependencies =
List(sbtio, typesafeConfig, scalaTest, scalaCheck, commonsCodec, caseapp, cats).map(_.withSources())
lazy val cmtcDependencies = (http4s ++ List(devDirs, circe, github4s, scalaTest, scalaCheck)).map(_.withSources())
lazy val functionalTestDependencies = List(scalaTest, scalaCheck).map(_.withSources())
}

0 comments on commit 0f94312

Please sign in to comment.