sbt-scapegoat
sbt-scapegoat copied to clipboard
How do I make `sbt scapegoat` not run `scapegoatClean`?
Currently when I run sbt scapegoat
it recompiles and reanalyzes my entire project. I want it to only analyze what was already going to be recompiled. I added scapegoatRunAlways := false
to my build.sbt
because it's documented as doing exactly what I want. It had no effect, and looking at the source for this project I see that it only affects the behavior of scapegoatCleanTask
, which can only be invoked manually.
I found this in the source:
(compile in Scapegoat) <<= (compile in Scapegoat) dependsOn scapegoatClean,
scapegoat := (compile in Scapegoat).value,
Since scapegoat
depends on scapegoatClean
, what I want seems to be impossible. The top line were changed to use scapegoatCleanTask
(which respects scapegoatRunAlways
) instead of scapegoatClean
, all would be well.
(compile in Scapegoat) <<= (compile in Scapegoat) dependsOn scapegoatCleanTask,
Yes it does clean on each run. That was part of the design so you get a full picture. I guess the devils advocate argument against your question is that if you only evaluate incrementally, it will lose the previous "errors"
Cleaning by default on each run is fine. I just want to be able to configure it to not clean on each run. If the impotency of scapegoatRunAlways
isn't considered a bug, is there any way I can achieve it's intended purpose of not cleaning on each run?
It can be changed to support what you want.
On 10 March 2016 at 00:07, Gordon Gustafson [email protected] wrote:
Cleaning by default on each run is fine. I just want to be able to configure it to not clean on each run. If the impotency of scapegoatRunAlways isn't considered a bug, is there any way I can achieve it's intended purpose of not cleaning on each run?
— Reply to this email directly or view it on GitHub https://github.com/sksamuel/sbt-scapegoat/issues/39#issuecomment-194579292 .
Related: https://github.com/sksamuel/sbt-scapegoat/issues/31