Skip to content

Commit

Permalink
Update sbt-checkstyle-plugin version to 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kxbmap committed Apr 3, 2016
1 parent d204a6d commit 70447eb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
16 changes: 5 additions & 11 deletions config/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import de.johoop.jacoco4sbt.JacocoPlugin.jacoco
import com.typesafe.sbt.SbtScalariform
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
import scalariform.formatter.preferences._
import com.etsy.sbt.Checkstyle._

SbtScalariform.scalariformSettings

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

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

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

CheckstyleTasks.checkstyleConfig := baseDirectory.value / "checkstyle-config.xml"

CheckstyleTasks.checkstyle in Compile := {
checkstyle in Compile := {
val log = streams.value.log
(CheckstyleTasks.checkstyle in Compile).value
val resultFile = (target in Compile).value / "checkstyle-report.xml"
(checkstyle in Compile).value
val resultFile = (checkstyleOutputFile in Compile).value
val results = scala.xml.XML.loadFile(resultFile)
val errorFiles = results \\ "checkstyle" \\ "file"

Expand Down Expand Up @@ -61,10 +58,7 @@ CheckstyleTasks.checkstyle in Compile := {
}

// add checkstyle as a dependency of doc
doc in Compile := {
(CheckstyleTasks.checkstyle in Compile).value
(doc in Compile).value
}
doc in Compile <<= (doc in Compile).dependsOn(checkstyle in Compile)

findbugsSettings
findbugsReportType := Some(ReportType.Html)
Expand Down
5 changes: 4 additions & 1 deletion project/Build.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import sbt._
import Keys._
import com.etsy.sbt.checkstyle.CheckstylePlugin.autoImport._
import com.typesafe.sbt.osgi.SbtOsgi
import com.typesafe.sbt.osgi.SbtOsgi.autoImport._
import com.typesafe.sbt.JavaVersionCheckPlugin.autoImport._
Expand Down Expand Up @@ -35,7 +36,9 @@ object ConfigBuild extends Build {
Seq(aggregate in doc := false,
doc := (doc in (configLib, Compile)).value,
aggregate in packageDoc := false,
packageDoc := (packageDoc in (configLib, Compile)).value)
packageDoc := (packageDoc in (configLib, Compile)).value,
aggregate in checkstyle := false,
checkstyle := (checkstyle in (configLib, Compile)).value)

lazy val root = Project(id = "root",
base = file("."),
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.8.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.2.1")

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

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

0 comments on commit 70447eb

Please sign in to comment.