# Community Edition and SonarLint using different branches

**URL:** <https://community.sonarsource.com/t/community-edition-and-sonarlint-using-different-branches/71386>\
**Category:** SonarQube Server / Community Build\
**Tags:** sonarqube-ide\
**Created:** [September 14, 2022, 2:10am UTC](https://community.sonarsource.com/t/community-edition-and-sonarlint-using-different-branches/71386 "2022-09-14T02:10:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim\_Firby](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jim_firby/32/37136_2.png) [@Jim\_Firby](https://community.sonarsource.com/u/Jim_Firby)\
**Post date:** [September 14, 2022, 2:10am UTC](https://community.sonarsource.com/t/community-edition-and-sonarlint-using-different-branches/71386/1 "2022-09-14T02:10:51Z")

</div>

I am setting up SonarQube and SonarLint in Visual Studio Code.

I have install SonarQube Community edition 9.6.1 and it is up and running fine.

I set up Jenkins to analyze one of my GitHub projects using the latest Jenkins SonarQube Scanner version 4.7.0. That also seems to work fine.

My project is using git with ‘master’ and ‘dev’ branches.

I run a Jenkins build that checked out and analyzed a feature branch from ‘dev’. This worked fine and uploaded to scan results to my SonarQube server where I could see the results.

So far so good.

Now I am trying to set up SonarLint version 3.9.0 in Visual Studio Code to show the scan results in the code there.

Here is where I am running into a problem. I see in all of the documentation and comments and help that in SonarQube Community edition the results will always be assigned to a branch called ‘master’, regardless of which branch was analyzed. Fair enough. However, in my SonarQube it shows the branch as ‘dev’ not ‘master’. I do not know why. I cannot change it, of course, and if I click on it I am asked to install the Developer edition, as expected.

![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/4/1/4172d7a1144b2858070e546ce36af51798c193d5.png)

My problem is that SonarLint is asking for information from the ‘master’ branch in SonarQube. That does not match the ‘dev’ branch shown in SonarQube so I get no scan data in Visual Studio Code (the log shows everything working except for the issue download calls which ask for ‘master’ and get “not found” responses).

![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/a/d/adcd54258455cd6553d89a624bb3ab471fd1d35a.png)

What do I do now? I seem to only get results in ‘dev’ on SonarQube but I can only fetch results from ‘master’ in SonarLint.

Is there some change in behavior recently with SonarQube? I was expecting to only see a ‘master’ branch, which would match with SonarLint.

---

<div class="post-metadata">

**Author:** ![JBL\_SonarSource](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jbl_sonarsource/32/64_2.png) [@JBL\_SonarSource](https://community.sonarsource.com/u/JBL_SonarSource)\
**Post date:** [September 26, 2022, 12:38pm UTC](https://community.sonarsource.com/t/community-edition-and-sonarlint-using-different-branches/71386/3 "2022-09-26T12:38:47Z")

</div>

Hello, welcome to the community! And thanks for reporting this behavior.

In theory, SonarLint should try to use the closest branch or default to the one that SonarQube reports as the “main” branch for the project, and only default to `master` when it has no clue.

Please note that we released a new version of SonarLint for VSCode last week, which includes a [fix](https://sonarsource.atlassian.net/browse/SLLS-97) for this behavior.
