Skip to content

Commit 70447eb

Browse files
committed
Update sbt-checkstyle-plugin version to 3.0.0
1 parent d204a6d commit 70447eb

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

config/build.sbt

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import de.johoop.jacoco4sbt.JacocoPlugin.jacoco
44
import com.typesafe.sbt.SbtScalariform
55
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
66
import scalariform.formatter.preferences._
7-
import com.etsy.sbt.Checkstyle._
87

98
SbtScalariform.scalariformSettings
109

@@ -26,14 +25,12 @@ libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test"
2625

2726
externalResolvers += "Scala Tools Snapshots" at "http://scala-tools.org/repo-snapshots/"
2827

29-
checkstyleSettings
28+
checkstyleConfigLocation := CheckstyleConfigLocation.File((baseDirectory.value / "checkstyle-config.xml").toString)
3029

31-
CheckstyleTasks.checkstyleConfig := baseDirectory.value / "checkstyle-config.xml"
32-
33-
CheckstyleTasks.checkstyle in Compile := {
30+
checkstyle in Compile := {
3431
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
3734
val results = scala.xml.XML.loadFile(resultFile)
3835
val errorFiles = results \\ "checkstyle" \\ "file"
3936

@@ -61,10 +58,7 @@ CheckstyleTasks.checkstyle in Compile := {
6158
}
6259

6360
// 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)
6862

6963
findbugsSettings
7064
findbugsReportType := Some(ReportType.Html)

project/Build.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import sbt._
22
import Keys._
3+
import com.etsy.sbt.checkstyle.CheckstylePlugin.autoImport._
34
import com.typesafe.sbt.osgi.SbtOsgi
45
import com.typesafe.sbt.osgi.SbtOsgi.autoImport._
56
import com.typesafe.sbt.JavaVersionCheckPlugin.autoImport._
@@ -35,7 +36,9 @@ object ConfigBuild extends Build {
3536
Seq(aggregate in doc := false,
3637
doc := (doc in (configLib, Compile)).value,
3738
aggregate in packageDoc := false,
38-
packageDoc := (packageDoc in (configLib, Compile)).value)
39+
packageDoc := (packageDoc in (configLib, Compile)).value,
40+
aggregate in checkstyle := false,
41+
checkstyle := (checkstyle in (configLib, Compile)).value)
3942

4043
lazy val root = Project(id = "root",
4144
base = file("."),

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
44
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.8.0")
55
addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.2.1")
66

7-
addSbtPlugin("com.etsy" % "sbt-checkstyle-plugin" % "0.4.1")
7+
addSbtPlugin("com.etsy" % "sbt-checkstyle-plugin" % "3.0.0")
88

99
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.8.5")
1010
addSbtPlugin("com.typesafe.sbt" % "sbt-javaversioncheck" % "0.1.0")

0 commit comments

Comments
 (0)