object PluginKeys is not a member of package org.scalastyle.sbt org.scalastyle.sbt.PluginKeys.scalastyle.toTask("").value
add below to project/plugins.sbt
and then add below to build.sbt
// Create a default Scala style task to run with tests
lazy val testScalaStyle = taskKey[Unit]("testScalaStyle")
testScalaStyle := {
org.scalastyle.sbt.PluginKeys.scalastyle.toTask("").value
}
(test in Test) <<= (test in Test) dependsOn testScalaStyle