Skip to content

Ability to run as a separate task #1

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

Open
mccartney opened this issue Oct 8, 2020 · 4 comments
Open

Ability to run as a separate task #1

mccartney opened this issue Oct 8, 2020 · 4 comments

Comments

@mccartney
Copy link

mccartney commented Oct 8, 2020

As far as I understand currently when using the plugin Scapegoat is being run together with all the compile tasks.
It'd be useful to be able to have it defined as a separate task and trigger it separately, e.g. ./gradlew scapegoat.

The real-life use-case for this is dealing with large code base which has tons of violations and gradually introducing Scapegoat to clean up some mess.

@eugene-sy
Copy link
Collaborator

Thank you for reporting this.
I was going to take a bit different approach:

  • provide per-task configuration to be able to disable the plugin for example for testCompile step, and also allow creating different reports. (right now the report will be overriden if you execute compile and testCompile tasks sequentially)
  • provide a gradle argument/flag to enable/disable scapegoat.

What do you think is better?

@mccartney
Copy link
Author

I am used to the separate task approach (e.g. this is how we run scalastyle currently), but I saw the one you suggest being used elsewhere too.

@eugene-sy
Copy link
Collaborator

Probably, it can be done both ways, and the user can choose what is more convenient.

@eugene-sy
Copy link
Collaborator

Sadly, Scala Gradle plugin is written in a such way, that it's very difficult to extend tasks. It seems the only way to go is to copy-paste a huge chunk of code.
For now, I added enable flags, so it addresses a part of the issue...

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

2 participants