forked from HairyFotr/linter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstaticanalysis.sbt
54 lines (38 loc) · 1.35 KB
/
staticanalysis.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
45
46
47
48
49
50
51
52
53
54
import de.johoop.cpd4sbt.CopyPasteDetector._
import de.johoop.cpd4sbt.{OutputType => CPDOutputType, ReportType => CPDReportType}
import de.johoop.findbugs4sbt._
scalacOptions ++= Seq(
"-feature",
"-deprecation",
"-unchecked",
"-Yrangepos",
"-Xlint",
//"-Xstrict-inference",
"-Ywarn-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-inaccessible",
//"-Ywarn-infer-any",//2.11
"-Ywarn-nullary-override",
"-Ywarn-nullary-unit",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard")
// Linter
//resolvers += Resolver.sonatypeRepo("snapshots")
//addCompilerPlugin("org.psywerx.hairyfotr" %% "linter" % "0.1-SNAPSHOT")
//scalacOptions += "-P:linter:disable:UseHypot+CloseSourceFile"
// or manually, e.g.
//scalacOptions += "-Xplugin:lib/linter_2.11-0.1-SNAPSHOT.jar"
// Wartremover
//wartremoverWarnings ++= Warts.unsafe
// Scalastyle
scalastyleConfig <<= baseDirectory { base => base / "sca" / "scalastyle-config.xml" }
// Findbugs (optionally put findbugs plugins (such as fb-contrib and findsecbugs) jars into ~/.findbugs/plugin)
findbugsSettings
findbugsEffort := Effort.Maximum
findbugsReportPath <<= baseDirectory { base => Some(base / "sca" / "findbugsoutput.xml") }
// CPD
cpdSettings
cpdTargetPath <<= baseDirectory { base => base / "sca" }
cpdReportName := "cpdoutput.txt"
cpdReportType := CPDReportType.Simple
cpdOutputType := CPDOutputType.Console