Update sbt-checkstyle-plugin version to 3.0.0

This commit is contained in:
kxbmap 2016-04-03 05:56:58 +09:00
parent d204a6d49e
commit 70447ebbaa
3 changed files with 10 additions and 13 deletions

View File

@ -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
@ -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"
@ -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)

View File

@ -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._
@ -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("."),

View File

@ -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")