-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
45 lines (37 loc) · 1.55 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
val scala3Version = "3.3.1"
lazy val customWarts = project.in(file(".warts")).settings(
scalaVersion := scala3Version,
scalaSource in Compile := baseDirectory.value / "src" / "main" / "warts",
libraryDependencies ++= Seq(
"org.wartremover" % "wartremover" % wartremover.Wart.PluginVersion cross CrossVersion.full
),
)
lazy val root = project
.in(file("."))
.settings(
name := "hello-scala",
version := "0.1.0",
scalaVersion := scala3Version,
scalaSource in Compile := baseDirectory.value / "src" / "main",
logLevel := Level.Warn,
run / watchLogLevel := Level.Warn,
Global / onChangedBuildSource := ReloadOnSourceChanges,
// wartremoverErrors ++= Warts.unsafe,
wartremoverErrors ++= Seq(
Wart.ArrayEquals, Wart.AnyVal, Wart.Equals, Wart.ExplicitImplicitTypes,
Wart.FinalCaseClass, Wart.ImplicitConversion,
Wart.JavaConversions, Wart.JavaSerializable, Wart.LeakingSealed,
Wart.Nothing, Wart.Option2Iterable, Wart.PublicInference,
),
wartremoverErrors ++= Seq(
ContribWart.OldTime, ContribWart.UnsafeInheritance,
ContribWart.MissingOverride, ContribWart.NoNeedForMonad,
ContribWart.UnintendedLaziness, ContribWart.DiscardedFuture,
),
wartremover.WartRemover.dependsOnLocalProjectWarts(customWarts),
wartremoverErrors ++= Seq(
Wart.custom("customWarts.CharPlusAny"), Wart.custom("customWarts.CharMinusAny"),
Wart.custom("customWarts.CharTimesAny"), Wart.custom("customWarts.CharDividedByAny"),
Wart.custom("customWarts.CharEqualsAny"),
),
)