scalastyle/scalastyle-plugin

Support Eclipse 4.6

Closed this issue · 3 comments

I tried installing scalastyle-plugin 0.7 and 0.8, but neither works in Eclipse 4.6, near as I can tell.

Even when I have scalastyle-config.xml files in the project, the dropdown box is empty. I generated the scalastyle-config.xml by running sbt scalastyleGenerateConfig, just to be sure that it didn't contain any syntax errors.

scalastyle_eclipse_4 6

Have you added the configuration to your workspace preferences, as described in Scalastyle - Eclipse - Getting started?

In particular:

Add the configuration file to the list of available configuration files
In the Workspace Preferences, select the Scalastyle configuration page. You can then add the file you’ve just copied into your project into that list.

Oh. I missed that step.

Yes: if I add the two scalastyle*-config.xml to the global Scalastyle configuration setting, then I can select either for my project.

Hmmm.... why do we have to add a file that specific to a project to a global configuration setting? I would have expected to be able to pick a Scalastyle configuration setting specific to a project without going through this step.

Another point regarding a single Scalastyle configuration per project:

I'm using Scalastyle for a Chisel project(https://chisel.eecs.berkeley.edu/). Chisel is a DSL (domain specific language) for defining hardware on top of Scala.

There is a separate scalastyle-test-config.xml for src/test/scala and scalastyle-config.xml for src/main/scala. Separate scalastyle makes sense for Chisel DSL as it would e.g. be very annoying for a hardware language not to be able to use constants directly in test code, so the Chisel guy has expressed that by having to Scalastyle configuration files.

Is there a way to set a separate Scalastyle fo src/test/scala and src/test/main?

It's a bit awkward to have this global configuration step, but the plugin is working as designed.