I bound the project with the project key in the plugin settings. Unfortunately, the deactivated rules are not applied. The rules are applied in SonarCloud. I have deactivated the rules in SonarCloud.
Why is not this working? How can I see which RuleSet SonarLint is loading and using from SonarCloud?
The Connected Mode documentation contains the following sentence:
When binding your local workspace folder to your SonarQube or SonarCloud project(s), SonarLint will try to match, as much as possible, the same rules and settings as found on the server.
Why just “will try to match”? Why just try? Is it not working properly?
I have deactivated rules in SonarCloud! The deactivated rules were still active in SonarLint. If I connect SonarLink with SonarCloud, it is to be expected that the deactivated rules are also deactivated in SonarLint.
Yes, the disabled rules were still applied in SonarLint. For example, I disabled php:S2003 and many other rules in SonarCloud. In SonarLint (IntelliJ), php:S2003 and the other disabled rules were still applied.
Yesterday I cleared the IntelliJ cache. Now the disabled rules seem to be applied in SonarLint. The Analytics result in SonarCloud and SonarLint do not match.
I hope this is a joke? I would understand that SonarLint updates the configuration when I start an analytics process with SonarLint. But you have to restart the IDE?!
The SonarLint plugin is updated so frequently that I see the problem as being with the plugin and that you don’t have a stable plug-in under control.
For example, SonarLint shows php:S4790 for a file, but SonarCloud does not.
I hope this is a joke? I would understand that SonarLint updates the configuration when I start an analytics process with SonarLint. But you have to restart the IDE?!
SonarLint synchronization for deactivated rules with SonarCloud happens in a few cases:
Once every hour
At IDE startup
When binding the project
This is a limitation with SonarCloud that does not exist with SonarQube, where changes are automatically propagated to SonarLint in almost real-time. This, however, concerns only rule modifications. You should receive other events in real-time, such as the issues status being modified or the new Quality Gate status.
Synchronizing on every analysis would not be possible, this is an operation that takes a few seconds up to more than a minute. SonarLint can trigger analysis every second, this is why we need a very fast response time.
Please note that clearing the cache should not impact the synchronization process.
The SonarLint plugin is updated so frequently that I see the problem as being with the plugin and that you don’t have a stable plug-in under control.
This synchronization behavior has always existed, and we have made efforts in the past year to promote real-time events on both SonarQube and SonarCloud. If you feel that we are still lacking some features, we would gladly hear about them so they can be considered.
Please note that clearing the cache should not impact the synchronization process.
I had opened and closed Intellij several times and re-bound the project in SonarLint. Even after 2-3 hours, the rules were not synchronised. Only after I had cleared the Intellij cache, SonarLint observed the deactivated rules.
If you feel that we are still lacking some features, we would gladly hear about them so they can be considered.
View when the last synchronisation took place*.
View which rule sets have been synchronised with SonarCloud and SonarCube and are in use.*
View which rules are enabled and disabled so you can check them.*
Start the synchronisation manually.
View the analysis results as in the SonarCloud summary.