Explorer activity steals focus on startup / switching workspace, can't be disabled

Please provide

  • Operating system: Ubuntu 24.04
  • SonarLint plugin version: 4.10.0
  • Programming language you’re coding in: C# mostly, some typescript, some Java
  • Is connected mode used: Yes
    • Connected to SonarCloud or SonarQube (and which version): Cloud

And a thorough description of the problem / question:

Recently, I’ve noticed that when I start VSCode or switch projects by opening a different workspace or folder, the selected Activity always switches to an empty SonarLint Explorer. I tried disabling that activity from the sidebar via right click → “Hide Explorer”, but it appears again automatically next time I open or switch. I work on many different projects and find this rather annoying, as I would prefer VSCode to open in the Folder view (which is at the top of my Activity sidebar). Disabling the SonarLint extension “fixes” this behavior of course - but then I don’t get inline warnings (which is what I really want from this plugin).

Is there an option I’m not seeing to prevent this behavior?

Thanks,

-e

1 Like

Hi There @evz-mx, welcome to Sonar Community! :wave:

Could you share a screenshot or a screen recording (GIF) of the behavior you are seeing? I am having a hard time understanding what exactly happens, and consequently, I am not able to reproduce it.

To be clear, the SonarLint extension for VSCode does not contribute any extension points that would cause users to focus on any specific view on startup.

Thanks in advance,
Sophio

video.zip (1.5 MB)

Video attached. I didn’t disable the SonarLint activity/sidebar icon in this video, but if I had, it would have re-enabled itself after restart. I wouldn’t need to do that if it didn’t have the behavior you can see in the video.

At first, I start VSCode with SonarLint enabled, and the default view is the empty Explorer. I move the other SonarLint activity to the bottom in case that matters and restart Code, same result. After disabling the SonarLint extension and restarting, the default activity is now the Folder view again, which is what I want.

Thanks for your help,

-e

Thank you! That helps a lot :slight_smile:

I think your problem looks very much like this one. In your video as well, you can see you have two “file explorer” icons, which is not the default and correct behavior.

The steps described in the solution of the mentioned thread should help.

Best,
Sophio

That indeed fixed it, thanks!

-e

1 Like

Awesome! :partying_face:

If you will have two minutes to spare, we would really appreciate it if you could review SonarLint on the VSCode Marketplace. :bowing_woman:

Enjoy coding with SonarLint!

Sophio from :sonarlint_vscode:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.