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

IDE Integration #333

Open
wborn opened this issue Sep 29, 2018 · 2 comments
Open

IDE Integration #333

wborn opened this issue Sep 29, 2018 · 2 comments

Comments

@wborn
Copy link
Member

wborn commented Sep 29, 2018

As a contributor it would be easier to comply to the SAT rules when they can be checked while using the openHAB Eclipse IDE. That way you don't have to run Maven commands and check SAT reports. You'd just see the PMD/Spotbugs/Checkstyle results as markers inline with your code.

All these plugins have IDE integrations. So we could:

  1. Add some documentation on how to setup these tools such that they generate the SAT results.
  2. Provide the plugins/configurations by default in the openHAB IDE.
  3. Create a single IDE plugin which shows the results of all tools used by SAT combined.
@kaikreuzer
Copy link
Member

  1. Provide the plugins/configurations by default in the ESH IDE.

@lpapazow
Copy link
Contributor

lpapazow commented Oct 30, 2018

I researched how we could create such plugin and I saw that the eclipse checkstyle plugin does not provide the option to be called from another plugin. The checkstyle plugin only provides extension points for adding custom checks, custom rulesets and custom filters. The pmd-eclipe-plugin provides extension point for custom ruleset

Since all of our custom checks except for one are written using the checkstyle API, it would be possible to generate the same results in maven and eclipse builds. However, we would have to manually run checkstyle, PMD and then the SpotBugs plugins one by one and thus

  1. Create a single IDE plugin which shows the results of all tools used by SAT combined.

will not be possible.

Alternatively, I saw that SonarQube allows writing custom Java rules and allows integrating checstyle, pmd and findbugs plugins as well. The SonarLint eclipse plugin could be connected to a SonarQube server, and will allow all of our maven checks (and more) to be executed by just one plugin. This option would require a running SonarQube server and would be very convinient if the ESH project is planning on introducing SonarQube as part of the build.

These are the 3 possibilities I can think of and IMHO 1 and 2 are the best options:

  1. When building the openhab.sat-plugin to create maven-plugin jar as well as eclipse-plugin jar that use the same custom rules/custom configurations. This would not satisfy the requirement to

Create a single IDE plugin which shows the results of all tools used by SAT combined.

  1. Introduce SonarQube for the ESH project and use SonarLint plugin.

  2. Use the data from the maven generated reports to show errors in eclipse. The problem is that It would require a new maven run for changes to take effect.

@kaikreuzer @martinvw @wborn do you like any of these suggestions and can you think of something else?

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

No branches or pull requests

3 participants