-
Notifications
You must be signed in to change notification settings - Fork 52
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 to trigger it:scalastyle? #64
Comments
+1 |
EDIT: turns out you need to copy a little boilerplate from the plugin to get this to work (would be nice to expose this for easier use). The following works for me: val codeStyleIntegrationTest = taskKey[Unit]("enforce code style then integration test")
// and then in settings...
Project.inConfig(IntegrationTest)(ScalastylePlugin.rawScalastyleSettings()) ++
Seq(
scalastyleConfig in IntegrationTest := (scalastyleConfig in scalastyle).value,
scalastyleTarget in IntegrationTest := target.value / "scalastyle-it-results.xml",
scalastyleFailOnError in IntegrationTest := (scalastyleFailOnError in scalastyle).value,
(scalastyleFailOnWarning in IntegrationTest) := (scalastyleFailOnWarning in scalastyle).value,
scalastyleSources in IntegrationTest := (unmanagedSourceDirectories in IntegrationTest).value,
codeStyleIntegrationTest := scalastyle.in(IntegrationTest).toTask("").value,
(test in IntegrationTest) := ((test in IntegrationTest) dependsOn codeStyleIntegrationTest).value
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The integration tests in our project are in the
/src/it
folder and the unit tests insrc/test
.Although
sbt test:scalastyle
works fine and checks all the files insrc/test
, the commandsbt it:scalastyle
checks the source files insrc/main
.Is there a way to configure the sbt scalastyle plugin to check the files in
/src/it
folder?The text was updated successfully, but these errors were encountered: