Skip to content

Commit

Permalink
updated build.sbt to remove nowarn error
Browse files Browse the repository at this point in the history
  • Loading branch information
abhidwivedi2701 committed Apr 26, 2024
1 parent 142b227 commit efa5d3b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
5 changes: 3 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@ pipeline {
do
sleep 10
done
sbt clean flowLint test scalafmtSbtCheck scalafmtCheck doc
sbt clean coverage flowLint test scalafmtSbtCheck scalafmtCheck doc
'''
sh 'sbt coverageAggregate'
}
finally {
junit allowEmptyResults: true, testResults: '**/target/test-reports/*.xml'
postSbtReport()
}
}
}
Expand Down
12 changes: 7 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ ThisBuild / scalaVersion := "2.13.10"

ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always

coverageDataDir := file("target/scala-2.13")
coverageHighlighting := true
coverageFailOnMinimum := true
coverageMinimumStmtTotal := 0
coverageMinimumBranchTotal := 0

lazy val allScalacOptions = Seq(
"-feature",
"-Xfatal-warnings",
Expand All @@ -15,6 +21,7 @@ lazy val allScalacOptions = Seq(
"-Ypatmat-exhaust-depth",
"100", // Fixes: Exhaustivity analysis reached max recursion depth, not all missing cases are reported.
"-Wconf:src=generated/.*:silent",
"-Wconf:cat=unused-nowarn:s",
"-Wconf:src=target/.*:silent", // silence the unused imports errors generated by the Play Routes
)

Expand Down Expand Up @@ -126,11 +133,6 @@ lazy val commonSettings: Seq[Setting[_]] = Seq(
),
scalacOptions ++= allScalacOptions,
coverageExcludedFiles := ".*\\/generated\\/.*;.*\\/api/app/generated\\/.*;.*\\/api/app/db/generated\\/.*",
coverageDataDir := file("target/scala-2.13"),
coverageHighlighting := true,
coverageFailOnMinimum := true,
coverageMinimumStmtTotal := 0,
coverageMinimumBranchTotal := 0,
credentials += credsToUse,
resolvers += "Artifactory" at "https://flow.jfrog.io/flow/libs-release/",
)
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ ThisBuild / libraryDependencySchemes ++= Seq(
)

addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11")

0 comments on commit efa5d3b

Please sign in to comment.