scalastyle / scalastyle-sbt-plugin

scalastyle-sbt-plugin
Apache License 2.0
139 stars 52 forks source link

Migrate to SBT AutoPlugin and require manual installation #49

Closed brunon closed 7 years ago

brunon commented 8 years ago

Fixes #48

Using the new AutoPlugin feature allows users to choose when to install the Scalastyle plugin. In a multi-project build where Scalastyle is only needed for some sub-projects, this is a critical feature. This also allows other AutoPlugin to override the default values.

Example project to enable the Scalastyle plugin:

val test = (project in file(".")).enablePlugins(ScalastylePlugin)
matthewfarwell commented 8 years ago

Could you test to see whether this still works with 0.13.0 etc please?

RomanIakovlev commented 8 years ago

Please make this happen! It would be highly beneficial for me to make my autoplugin depend on scalastyle plugin.

dwijnand commented 8 years ago

@brunon FYI, Travis failed.

RomanIakovlev commented 8 years ago

@brunon I think tests fail because you have changed to manually enable the scalastyle plugin, but haven't updated projects under test to actually enable it.

brunon commented 8 years ago

Actually, no it doesn't work with 0.13.0, since the AutoPlugin feature was only introduced in 0.13.5 if I recall. I have updated the build.properties of all test projects to require 0.13.5 now, hope that's OK with you. Tests now succeed locally. I have also added an autoImport definition to make sure settings are automatically made available to build.sbt files

brunon commented 8 years ago

Build succeeds but there was some kind of buffer overflow error in the openjdk build, if you have access can you try restarting it

dwijnand commented 8 years ago

It's a very spammy, but you can close-and-reopen pull requests to trigger Travis to rebuild.

brunon commented 8 years ago

Sorry for the delay - builds pass now

matthewfarwell commented 7 years ago

Thanks for your work. I've merged #52, which solved the same problem really. I did this for 2 reasons, 1) the number of commits in their PR, and 2) they didn't require activating the plugin manually, which I think will ease peoples transition.

Sorry, but thanks for your work.