Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I make sbt scapegoat not run scapegoatClean? #39

Open
GordonGustafson opened this issue Mar 9, 2016 · 4 comments
Open

How do I make sbt scapegoat not run scapegoatClean? #39

GordonGustafson opened this issue Mar 9, 2016 · 4 comments

Comments

@GordonGustafson
Copy link

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,
@sksamuel
Copy link
Collaborator

sksamuel commented Mar 9, 2016

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"

@GordonGustafson
Copy link
Author

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?

@sksamuel
Copy link
Collaborator

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
#39 (comment)
.

@dskrvk
Copy link

dskrvk commented Nov 4, 2016

Related: #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants