1. When code is not yet inside the code base. Sonar issue will not appear in the Onap’s Sonar website until it gets +2 and submitted.
  2. Not everything that Sonar is marking is correct. If some of it does not make sense let us know.
  3. To configure sonarLint plug in do the following.

4, Create Token

4, config Sonar server

5. Select sdc-main project

6. A little trick - how to view git review Sonar issues at one glance:

    1. Once the plugin is configured I use gerrit Idea Plugin. I select the git review and makes cherry pick.

b. Back to Sonar lint perform “Analyze VCS changed file”

c. Result - one glance of all Sonar issues for the cherry pick



 

 

 

 

  • No labels

2 Comments

  1. This configuration stopped to work for me in one of the IntelliJ updates.

    After some long researching and tries, I found out that it was not working with the built in Jetbrains JRE 11, the one that comes with the IntelliJ. It seems that the SonarLint plugin uses the same JRE as IntelliJ, and it was falling to find/load some classes with that version.

    An easy way to change the JRE version that the IntelliJ is running, is to install the plugin Choose Runtime from Jetbrains: https://plugins.jetbrains.com/plugin/12836-choose-runtime/. Then, Ctrl+Shift+A and search for "Choose Runtime", select it, and in a dialog you can choose the version or point to a new one.

    Changing to a JRE 8, the SonarLint started to work again with Sonar ONAP server. The problem is that IntelliJ started to run very slowly and with deformed fonts, and that is another story.

    I also thinks that this problem is a combined issue with SonarLint, JRE and the sonar server. So, maybe updating the Sonar ONAP server we can manage to get that back working. Is there any possibility to do that?

    To test that assumption I will run a sonar server locally and see the results.

    Also, anyone else is having the same issue? In my team, another person has, and the problem started about the same time as me.

    1. I've run a sonar server locally with version 7.9.1 (ONAP has a version 6.7.1) and it worked. I was able to connect with IntelliJ SonarLint plugin and see the analysis errors.

      So updating ONAP Sonarqube server should work.