SonarLint ignores non-default quality profile on SonarQube server

The SonarLint plugin ignores settings (i.e. deactivated rules) from a non-default Java quality profile for the connected project on the SonarQube server.
Code lines matching the deactivated Java rules are marked as “issues” by the SonarLint plugin. On the SonarQube server these “issues” are correctly absent.
In earlier (but recent) versions of SonarLint (and/or IntelliJ) this seemed to work.

IntelliJ IDEA 2019.2.1 (Ultimate Edition)
Build #IU-192.6262.58, built on August 20, 2019

SonarLint IntelliJ 4.1.0.3312

SonarCube server: 7.6.0.21501

3 Likes

I’m seeing the same issue - when working in connected mode, the latest version of sonarlint for intellij (4.1.0.3312) is using the default profile (in my case for java) instead of the project’s configured quality profile. I downgraded sonarlint to the previous version (4.0.2.3009) and everything works fine.

IntelliJ IDEA 2019.2.1 (Ultimate Edition)
SonarLint IntelliJ 4.1.0.3312
SonarQube 6.7.6 (build 38781)

@Yaniv_Nahoum Thanks for your confirmation. How did you downgrade the plugin? Uninstall, and reinstall the older version “manually”?

Yes exactly. To install the previous plugin, download it and then in intellij settings> plugins choose “install from disk”

1 Like

@Yaniv_Nahoum thx

I am having similar issue with latest version update for SonarLint, Do we have a resolution in place or the only option is to go back to older version of SonarLint?

Hello, thank you all for your feedback. We found the root cause of this regression and we are preparing a bugfix release of SonarLint for IntelliJ. Sorry for the inconvenience!

In the meantime, a possible workaround is indeed to revert to a previous version.

[edit]
SonarLint for IntelliJ 4.1.1.3345 has just been published on the JetBrains Marketplace. Enjoy!

4 Likes

I just tried the new version and can confirm the issue has been fixed. Thanks!

3 Likes

We have the same issue with version 4.2 of SonarLint in IntelliJ (goes back to the default Java quality profile)

Could you please look into if the bugfix has been applied to the latest version as well ?

BR Casper

Hello @Casper, version 4.2.0.3434 should have the same behavior as 4.1.1 in this respect.

I suggest that you describe the symptoms that you observe in a new thread, with appropriate console log extracts (please refer to the FAQ to get detailed logs).

1 Like

Hi Jean-Baptiste,

My apologies, I can’t reproduce the error now. So all is well in the 4.2.0.3434. :smile:

I must have been running with an old version before.

Sorry for wasting your time, and keep up the good work.

BR Casper

2 Likes