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

Suggest that sbt test depends on compile:scalastyle as well #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

huonw
Copy link

@huonw huonw commented Jan 8, 2019

This expands the documentation to explicitly have the example code make test depend on compile:scalastyle, that is, make sbt test also run scalastyle on the main code.

This is designed to be the common case, and a slightly "safer" default. It seems like many people wanting to have scalastyle as part of their tests will want to also be testing their main code. And, as a default, people copying in the code without fully understanding it (or, maybe, without fully understanding sbt's compilation model) will have all their code checked. With the new, one only has to delete some lines to have sbt test only run scalastyle on the tests; with the old, one has to realise that some code needs to be added, and then add it to have sbt test run scalastyle on the main code. The first of those seems simpler.

This expands the documentation to explicitly have the example code make `test` depend on `compile:scalastyle`, that is, make `sbt test` also run scalastyle on the main code.

This is designed to be the common case, and a slightly "safer" default. It seems like many people wanting to have scalastyle as part of their tests will want to also be testing their main code. And, as a default, people copying in the code without fully understanding it (or, maybe, without fully understanding sbt's compilation model) will have all their code checked. With the new, one only has to delete some lines to have `sbt test` only run scalastyle on the tests; with the old, one has to realise that some code needs to be added, and then add it to have `sbt test` run scalastyle on the main code. The first of those seems simpler.
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

Successfully merging this pull request may close these issues.

1 participant