-
Notifications
You must be signed in to change notification settings - Fork 26
SonarLint for Eclipse
According to the web page:
SonarLint is an Eclipse plugin that provides on-the-fly feedback to developers on new bugs and quality issues injected into Java, JavaScript and PHP code.
OpenEdge code can't be checked in SonarLint for Eclipse without a SonarQube server. Please refer to the Getting started page in order to set up a SonarQube server.
In order to install (or upgrade) SonarLint with Progress Developer Studio, please download the right version:
- For Developer Studio 11.7: Version 6.2.2238
- For Developer Studio 12.2 and newer: Version 7.6.2312
🚯 Please don't report issues to the public mailing lists of SonarLint, as this is not a supported configuration.
From Progress Developer Studio:
- choose
Help
->Install new software...
- click on
Add...
, then on theArchive...
button and select the ZIP file you just downloaded - check the two boxes
SonarLint for Eclipse
andRequired dependencies
- click on
Next >
and follow the instructions - restart Progress Developer Studio
Open the SonarLint Bindings
view, then configure your server connection:
Make sure your project is available on SonarQube (analyzed at least once). Right-click on your project, and select SonarLint
-> Bind to SonarQube or SonarCloud
, then attach your OpenEdge project to a SonarQube project using the SonarQube project key.
- First verify that all databases have a unique identifier. This can be found by executing
FIND FIRST _db. MESSAGE _db-guid.
while connected to each database. Any duplicates in the list of GUIDs will probably lead to an inconsistent database schema in SonarLint. - If using TCP/IP database connections, the schema may not be available immediately from Developer Studio. You can use
OpenEdge -> Refresh cache
in Developer Studio to refresh the schema. - You can also delete the
.schema
files in<project_root>/.sonarlint
to force a refresh during the next analysis
If workspace option Build automatically
(from Project
menu) is unset, and Compile on save if required
(from Preferences -> Progress OpenEdge -> Editor -> Build
) is set, then SonarLint and the compiler are triggered at the same time, and then XML files can't be parsed correctly as they may not be fully generated. In this case, disable Run SonarLint automatically
from SonarLint, and trigger analysis manually.
In case you don't see any issue reported in your source code, then you should enable 'Analysis log' and 'Verbose output' in the SonarLint Console (from Console view).
SonarLint annotations can be configured in the Eclipse preferences, section General > Editors > Text editors > Annotations
As PDSOE 11.7 is based on Eclipse 4.5 (released in 2015), there is a small incompatibility between SonarLint and Eclipse secure storage. If you have an error message when trying to connect to the remote SonarQube server, then you should delete the existing secure storage:
- Open Eclipse preferences
- Section General > Security > Secure Storage, then Contents tab
- Select existing "Default Secure Storage" and click on Delete
© Riverside Software 2013-2024