SonarQube IDE scanning all the files instead of opened file when installed Agent force VSCODE

Hi Team,

we are using the Sonarqube for IDE in our vscode and also we have installed the agent force latest version plugin (1.13.0) for our salesforce project. from when installed the version of agent force plugin latest version SOnarqube is scanning the all the files in the project even before opening the file, continuosly scanning all the files which is confusing the user.
Could you please help me if there is any solution for this issue.

in the given screen shot we can see the logs where it is analyzing the all the files which are in project.

  • Operating system: Mac & Windows
  • SonarQube for VS Code plugin version: 4.16.0
  • Programming language you’re coding in: Apex, java, xml
  • Is connected mode used:

Hi there @Rajashekar, thanks for reporting this!!

I believe this thread is almost identical to this other one.

In short, currently, SonarQube for IDE will analyze (almost) all files that are reported as “open” by the IDE (regardless if they are actually open or simply open in the background by other extensions). Improvements to analysis performance is coming in the next version, and we are constantly working on further improvements.

We would need to rethink and refactor how analysis is triggered in SonarQube for IDE in order to prevent this. I cannot commit to any timeline for this for now.

I hope this helps, even though it’s not really a solution :smiling_face_with_tear: :sweat_smile:
Best,
Sophio

Thank you for replying @sophio.japharidze , what are the actions you are going to take for this issue to stop the agent force to open the files internally. Or you are going to modify your code to prevent to scan all the files.

Did you take this issue into consideration for the next version and would really great if you can let me know the tentative ETA for that. :grinning:

As you can imagine, we cannot control what other extensions do, and we cannot force them not to open the files in the background.

We are going to ship the analysis performance improvements in the next version so that launching so many analyses does not cause as much toil on users’ machines. Further improvements will come soon.

The big refactoring of how we trigger analyses (to prevent scanning all files) is not yet planned. We would need to explore possible approaches.

Just to be sure, is this the extension you are referring to?

Best,
Sophio

1 Like

And also to be sure, what is the exact problem you are facing?

Is the IDE being slowed down by all the analyses? Or are there just way too many irrelevant issues showing up in the PROBLEMS view?

Thanks,
Sophio

Yeah, its the same Extension I’m using Agent force (einsten gpt) along with SonarQube.

problems are both, we are getting confused of showing all in the problems view. Some times if the files are in huge, then the connection is also getting failed.

Thanks,
Rajashekar

Thanks for clarifying!

we are getting confused of showing all in the problems view

Here, possibly applying a filter to the PROBLEMS view could help - i.e. ticking the “show active file only” option

Some times if the files are in huge, then the connection is also getting failed.

This sounds strange and scary. What is happening exactly? Could you share the logs from SonarQube for IDE output?

Best,
Sophio

Thanks for the update,

Sorry, i don’t have any logs for that case now Since it happened once and not displayed anything in the logs, was showing the failed pop in connection page and that has been resolved when i tried to create the connection again.

and thanks for the work around you provided for the problems view, but still when we open the large projects, logs are loading continuosly and causing the performance issue which results in systems slow down.

Have you tried reproducing the issue?

Best,
Rajashekar

Hello,

As linked above, I can reproduce the original issue and we know what is the root cause.

I have not been able to reproduce the “connection failure”, though. If you face it again, I suggest creating a separate post for it in the forum, and we will try our best to investigate!

Sophio

connection failed is not an issue now, as i mentioned automatic scanning of all project files is only the main issue. let me know if you have any actions

1 Like

Analysis performance improvements will be shipped in the next version. No further actions planned for now.

Just one clarity, performance improvements means you are going to stop the plugin to scan all the files? Or is it a alternate one to improve the performance?

Thanks

We will still analyze all files that are reported as opened by the IDE, but we will do it faster, so it should not slow down the system that much.

Thank you for the response,

i will be waiting to hear back from you again when the issue is resolved.

Best,