scapegoat-scala / sbt-scapegoat

sbt plugin for scapegoat scala static analysis plugin
Apache License 2.0
140 stars 33 forks source link

Can't use plugin with sbt 1.0 #56

Open unoexperto opened 7 years ago

unoexperto commented 7 years ago

Not sure what I do wrong but plugin is not available neither with version 1.0.0 nor with 1.0.1

[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      com.sksamuel.scapegoat:sbt-scapegoat:1.0.4 (scalaVersion=2.12, sbtVersion=1.0)
[warn] 
[warn]  Note: Unresolved dependencies path:
[warn]      com.sksamuel.scapegoat:sbt-scapegoat:1.0.4 (scalaVersion=2.12, sbtVersion=1.0) (/home/expert/work/sideprojects/akka-http-throttling/project/plugins.sbt#L5-6)
[warn]        +- default:akka-http-throttling-build:0.1-SNAPSHOT (scalaVersion=2.12, sbtVersion=1.0)

What am I missing ?

pomadchin commented 7 years ago

Specify the latest scapegoat version to be added as a dep by this plugin. docs link:

scapegoatVersion in ThisBuild := "1.3.3"
ashleymercer commented 6 years ago

I've just hit this same problem: the main documentation simply says to set scapegoatVersion, but (at least for multi-module builds) it's necessary to explicitly set scapegoatVersion in ThisBuild.

Two questions:

dvgica commented 6 years ago

Setting scapegoatVersion in ThisBuild := "1.3.3" in build.sbt doesn't even seem to help for me, in a multi-module build for SBT 0.13.15. SBT still looks for 1.0.0 for some reason, which doesn't exist for Scala 2.12.

susu commented 6 years ago

Thanks! This in ThisBuild helped me for scala 2.12 and SBT 1.0.3 in case of multi-project build. I had to define it for all subproject - i.e. in common place.