SonarQube for IntelliJ and VSCode not receiving/analyzing correctly issues

Otherwise, please provide:

  • Operating system: Indifferent, tested on Mac and Windows
  • IDE name and flavor/env: IntelliJ and VSCode
  • SonarQube edition: Enterprise

Hi there,

I have a weird thing with two projects on one of our customers.

They have the particularity that their main branch is develop:

imagen

They have some issues on SonarQube Server Enterprise which none of them synchronize with SonarQube for IDE, for example:

IntelliJ

VSCode

I have tested develop/master and both have the issue(s) in SonarQube but not in SonarQube for IDE.

imagen

They select correctly the branch to download the issues.

As you would imagine, project is correctly bound and I tested latest versions of:

  • SonarQube Server (2025.1.3, I know yesterday 1.4 was released)
  • SonarQube IDE for IntelliJ
  • SonarQube IDE for VSCode

Is there something I am missing? I could provide more details by DM, as the info is from one of our customers.

Thank you,

Mariote

Hi, there, again:

I have deleted master branch in SonarQube Server and issues on SonarQube IDE started to appear:

I have left the other one project intact in order to track the issue if you need it.

Thank you.

Mariote

Hey @mbastardo.excentia, thanks for reaching out.

This is an interesting scenario, it would be great if you could provide the full verbose logs when the issue happens

Despite not synchronizing the issues, SonarQube for IDE should still be able to run an analysis and detect issues locally, even if they are not matched with the server (given that the rules are enabled).

1 Like

Hi, Nicolas.

Sadly, I can only provide logs and further info via DM, as is confidential info from one of our customers.

Is that ok for you if I reach you via DM?

Regards

Feel free to send me the information via DM, I will send you a first message to open the conversation.

If needed, I can also open a shared Google Drive folder, only accessible by you and a few of our internal engineers at Sonar, in case direct messages have limitations in terms of size, for example.

1 Like

Hello @mbastardo.excentia

Thanks a lot for your responsiveness and valuable input.
I have two topics to clarify on your case. I’m sorry, it’s a bit wordy.

  1. We noticed that the rule that you show as an example is sensitive to java target version. Because the ExecutorService became AutoCloseable in JDK 21. So if you have different target versions locally and on server it’s expected to not have it reported on a side where you use target version lower than 21. So my questions are:
    What is java target version in your project and what JDK version do you use in your project?
    Maybe by aligning the target versions locally you will be able to solve the problem. Please let us know if it will help partially or completely.

  2. I’m not sure I got completely the situation with branches.
    This ‘develop‘ branch on your SonarQube Server side - is it the single analyzed branch you have? Or you have other branches scanned? If you have other branches scanned, please tell.
    Do I get it right that when you delete this ‘develop‘ branch on SonarQube Server side, you start to getting all issues as expected? If it’s the case, what branch your SonarQube IDE is using to sync? You should be able to see the log messages like:
    [sonarlint-branch-matcher] DEBUG sonarlint - Matched Sonar project branch for configuration scope 'XXX' changed from 'Y' to 'Z'
    So after deletion of the ‘develop‘ what does it change to?

Best regards,
Kirill

1 Like

Hi, Kirill

Thank you for your response :slight_smile:

1.- a) In this pom it is declared to be 1.8, so is not AutoCloseable. IntelliJ and VSCode are launched with Java 21. IntelliJ, up to my knowledge does not allow to change boot JDK. VSCode does but it does nothing :frowning:

b) On server, we launch SonarQube with Java 17.

Which one do we have to align?

2.- Nope, develop is not the only one, but is the main one. The one they analyze and use as main branch. They have master also analyzed in the server but two years ago. (as I said, they don’t use it)

It is when I deleted master on the other project when we first started to have the issues right.

The log states:

imagen

2025-10-29 12:09:06.903 [info] [Debug - 12:09:06.902] [sonarlint : sonarlint-branch-matcher] Matched Sonar project branch for configuration scope 'file:///Users/mariote/Documents/clientes/xxxxxxxxxxx/xxxxx/xxxxxx' changed from 'null' to 'develop'

And in IntelliJ:

imagen

Thank you!

Hello @mbastardo.excentia, sorry for a long pause.

I have tried to reproduce the problem, but I could not. I have recreated the repository with two branches develop and master. With develop branch as a main one. Scanned both on the SonarQube Server and checked in connected mode which scanned branch is being used to pull issues by SonarQube in IDE, when develop branch is checked out in git locally. It works as expected on my side - main branch, which named develop in this case is used.

So if you are interested to proceed with the topic, the only thing I can ask you about is to create the public GitHub repository as a reproducer and provide a link to it. So we could provision it on SonarQube server or cloud and observe the problem.

Best,
Kirill

1 Like

Hi, Kirill:

I just saw developers had changed this class to not have the affected method, so it will be impossible to track down. I think it wasn’t due to a failure in that particular code but a failure in their SonarQube Server.

I think, sadly, we must close this thread.

Thank you so much to you all, for your dedication and effort. It’s a pleasure for us to be part of this great team.

Regards,

Mariote

2 Likes