Reputation: 2167
I've a SBT project on a multi-project build set up.
I'd like to run scalastyle for only a few files within the project, which could be located in any of the three projects. In order to select those files, I'm modifying the scalastyleSources
from the command line before running scalastyle
like so:
sbt 'set scalastyleSources := Seq(file("app/util/Util.scala"))' scalastyle
This runs for root
correctly upon the file that I'm specifying, but it then runs two more times for sub-projectA and sub-projectB, completely ignoring the files I previously assigned to the scalastyleSources
.
I'd need a way to either let SBT know that I only want to run scalastyle once with the altered configuration OR the ability to ignore a certain project entirely when running the command.
Is this possible at all?
Upvotes: 0
Views: 440
Reputation: 1562
It's possible to disable the task in any of sub-projects with scalastyle := {}
Also, passing the file names as a command line parameter looks strange. In that case I would use scalastyle without sbt.
Upvotes: 0