Operating system: Windows 10, Fedora Linux, Alma Linux
SonarLint plugin version: 10.4.1.77998
Programming language you’re coding in: Java
Is connected mode used: Yes
Connected to SonarCloud or SonarQube (and which version): Enterprise Sonar Server 10.3 Build 82913
Also using Idea 2023.3.5, 2023.2.6, community and ultimate editions
And a thorough description of the problem / question:
Configured Idea sonarlint plugin to connect to our Sonar Enterprise server and begins synchronizing. Waited 5+ hours and it is still incomplete. Not sure if it is simply taking an extremely long time or if it is stuck. Idea is working as the synchronization is running.
The project is a legacy system with many open issues. We are moving to the “Clean as you code” methodology since it is not practical to solve all issues at this point. There are approximately 300k legacy issues over 3.5M lines of code.
I suspect there is either a misconfiguration somewhere or an extreme performance issue. Many users have tried to setup sonarlint with the same result.
Got the same issue here, using Ubuntu 22.04 and latest IDEA.
This issue started in the previous release of the Sonarlint plugin and is still there with the latest one.
Connected to SonarCloud or SonarQube (and which version): SonarQube Community Edition
Version 9.8 (build 63668)
And a thorough description of the problem / question:
After upgrading the SonarLint intellij plugin to any version 10.4.x (the ones where SonarLint runs in a separate process), background tasks are spawned and the number of them keeps increasing indefinitely:
I tried new plugin (10.5.0.78034) on Idea Ultimate running in Fedora Linux and Idea Community running in Alma Linux running in WSL. I did not see a significant improvement (it may be better but I could not tell since the synchronization time is still measured in hours). I captured thread dumps and include them below. I capture a thread dump at various points in time.
In both cases I first removed the latest sonarlint plugin, restarted idea, then installed the experimental sonarlint plugin. I did not attempt to cleanup any leftover configuration or data that may have been leftover from the original latest sonarlint plugin.
After posting the sonarlint synchronization with our Sonar Enterprise server did complete. It appears to work as expected in my Fedora Idea Ultimate environment but in the Alma WSL Idea Community the sonarlint was showing issues, but the issues reported did not apply rule configuration from the Sonar Enterprise server (may synchronization was not 100% successful). For example, we have bumped the cognitive complexity rule threshold from 15 to 30, I see this setting correctly on Fedora Idea Ultimate but not on Alma Idea Community. The experimental sonarlint plugin has not changed this observation.
I also had ‘Automatically trigger analysis’ enabled which triggered a lot of ‘SonarLint Analysis’ tasks to start as I was working. These analysis scans were not completing or taking a really long time. Over time I see that there many scans running (50+) and some were in ‘stopping’ state but did not seem to ever stop.
I just exited out of Idea and started again and I see the same ‘synchronizing’ process has started again and is again taking a long time to complete (at least longer than 10 to 20 minutes). I am also finding that opening new source files and running analysis on them is taking a long time (has not completed for 10-20 minutes so far).
Some other factors to note not included in the original problem description.
Full analysis published to the Sonar Enterprise server takes 1.75-2 hours. We don’t use the sonar gradle plugin for full source analysis as it is less efficient than using the sonar CLI.
The quality profile for the project analysis contains 520 rules, 5 of which are custom (created by us)
The Sonar Enterprise server is running in Munich Germany and I work in Boston Massachusetts. Many developers are in Gdynia Poland so they will also be remote to the Sonar Enterprise server.
We use git as source repository and gradle as build system.
We just released a new version on the marketplace (10.5.0), which contains a lot of fixes, notably for big projects, as reported in this thread. Could you please give it a try and report back?
Thanks!
I installed the new Idea SonarLint plugin (10.5.0.78339) and it works better. I have not seen any issues with sonarlint analysis at commit or on-demand analysis as browsing sources.