-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
65 lines (48 loc) · 2.05 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
//import de.johoop.cpd4sbt.CopyPasteDetector._
//import de.johoop.cpd4sbt.{OutputType, ReportType}
import scalariform.formatter.preferences._
name := "skeleton"
organization := "com.cascadeofinsights"
version := "1.2"
scalaVersion := "2.11.7"
resolvers += Resolver.sonatypeRepo("snapshots")
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "2.2.4" % "test,it"
)
// code style from marathon
lazy val formatSettings = SbtScalariform.scalariformSettings ++ Seq(
ScalariformKeys.preferences := FormattingPreferences()
.setPreference(AlignArguments, false)
.setPreference(AlignParameters, false)
.setPreference(AlignSingleLineCaseStatements, false)
.setPreference(CompactControlReadability, false)
.setPreference(DoubleIndentClassDeclaration, true)
.setPreference(DanglingCloseParenthesis, Preserve)
.setPreference(FormatXml, true)
.setPreference(IndentSpaces, 2)
.setPreference(IndentWithTabs, false)
.setPreference(MultilineScaladocCommentsStartOnFirstLine, false)
.setPreference(PlaceScaladocAsterisksBeneathSecondAsterisk, true)
.setPreference(PreserveSpaceBeforeArguments, true)
.setPreference(SpacesAroundMultiImports, true)
.setPreference(SpaceBeforeColon, false)
.setPreference(SpaceInsideBrackets, false)
.setPreference(SpaceInsideParentheses, false)
.setPreference(SpacesWithinPatternBinders, true)
)
scalacOptions ++= List("-feature","-deprecation", "-unchecked", "-Xlint")
/*
Static Analysis
*/
addCompilerPlugin("org.psywerx.hairyfotr" %% "linter" % "0.1-SNAPSHOT")
//wartremoverWarnings ++= Warts.all // Some false positives
//wartremoverWarnings ++= Warts.unsafe //No false positive
//add Scapegoat to compile
//(compile in Compile) <<= (compile in Compile) dependsOn scapegoat
//Style Check section
scalastyleConfig <<= baseDirectory { _ / "src/main/config" / "scalastyle-config.xml" }
//cpdSettings - not working
//enablePlugins(CopyPasteDetector)
//cpdReportType := ReportType.Simple
//cpdOutputType := OutputType.Console