@@ -4,7 +4,6 @@ import de.johoop.jacoco4sbt.JacocoPlugin.jacoco
4
4
import com .typesafe .sbt .SbtScalariform
5
5
import com .typesafe .sbt .SbtScalariform .ScalariformKeys
6
6
import scalariform .formatter .preferences ._
7
- import com .etsy .sbt .Checkstyle ._
8
7
9
8
SbtScalariform .scalariformSettings
10
9
@@ -26,14 +25,12 @@ libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test"
26
25
27
26
externalResolvers += " Scala Tools Snapshots" at " http://scala-tools.org/repo-snapshots/"
28
27
29
- checkstyleSettings
28
+ checkstyleConfigLocation := CheckstyleConfigLocation . File ((baseDirectory.value / " checkstyle-config.xml " ).toString)
30
29
31
- CheckstyleTasks .checkstyleConfig := baseDirectory.value / " checkstyle-config.xml"
32
-
33
- CheckstyleTasks .checkstyle in Compile := {
30
+ checkstyle in Compile := {
34
31
val log = streams.value.log
35
- (CheckstyleTasks . checkstyle in Compile ).value
36
- val resultFile = (target in Compile ).value / " checkstyle-report.xml "
32
+ (checkstyle in Compile ).value
33
+ val resultFile = (checkstyleOutputFile in Compile ).value
37
34
val results = scala.xml.XML .loadFile(resultFile)
38
35
val errorFiles = results \\ " checkstyle" \\ " file"
39
36
@@ -61,10 +58,7 @@ CheckstyleTasks.checkstyle in Compile := {
61
58
}
62
59
63
60
// add checkstyle as a dependency of doc
64
- doc in Compile := {
65
- (CheckstyleTasks .checkstyle in Compile ).value
66
- (doc in Compile ).value
67
- }
61
+ doc in Compile <<= (doc in Compile ).dependsOn(checkstyle in Compile )
68
62
69
63
findbugsSettings
70
64
findbugsReportType := Some (ReportType .Html )
0 commit comments