How to hook up sonarlint to bluej IDE

41 views
Skip to first unread message

shah...@gmail.com

unread,
Nov 8, 2017, 6:32:41 PM11/8/17
to SonarLint
Hi I am interested in creating an extension for sonarlint with the bluej IDE

Can anyone give me any insight on what direction I should take to getting started?  Is there any good documentation on using the sonarlint api and plugin?

Julien HENRY

unread,
Nov 9, 2017, 3:58:45 AM11/9/17
to shah...@gmail.com, SonarLint
Hi,

There are 2 different architectures for SonarLint flavors: Eclipse and IntelliJ plugins are embedding the sonarlint-core library, while VSCode, Atom and Visual Studio (partially) rely on starting a separate SonarLint process (called server or daemon) and then use inter-process communication between the IDE and the SonarLint process (either the standard language server protocol, or a custom grpc one).

Since bluej is a Java IDE, I would suggest to use option one, except if there is already a client library for the language server protocol.

SonarLint Core provides an API to run analysis on file(s) and returns issues. In connected mode, it will also take care of fetching server side data, and storing them in a local storage, but I suggest you forget connected mode for a first implementation. The main work to do is really IDE integration:
  - analysis trigger: find a hook in IDE to trigger on the fly analysis (could be on file open/save). You can also have a manual trigger with a menu entry, but that's not the main spirit of SonarLint
  - analysis configuration: this is very important for SonarJava analyzer to access the classpath of the file(s) that are analyzed. So you have to extract from the IDE the location of .class and libraries, and populate properties sonar.java.binaries/sonar.java.libraries before calling SonarLint Core
  - show issues on the code: again, this is IDE specific code
  - optionally show issue list in a dedicated panel

Then there are many other small details:
  - redirect SonarLint Core logs to a console (or any other appropriate output)
  - have a way to display rule description
  - global/per project configuration

All SonarLint flavors are open source, so I suggest you have a look at them, and come back with more specific questions.

Regards,

Julien Henry | SonarSource

Developer

https://sonarsource.com


2017-11-09 0:32 GMT+01:00 <shah...@gmail.com>:
Hi I am interested in creating an extension for sonarlint with the bluej IDE

Can anyone give me any insight on what direction I should take to getting started?  Is there any good documentation on using the sonarlint api and plugin?

--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/d1046d33-8d55-4337-b708-923c2d1f21d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages