SonarQube 7.2, VSTS Plugin 4.3.0 stop work with Pull request

Ok, before version 7.2 I was able to analyze another branch than master. I don’t want to analyze all branches. We have one developer branch and master branch. Before 7.2 we had analyzer to developer branch, after upgrade to 7.2 we got error To use the property “sonar.branch.name”, the branch plugin is required but not installed. Why? Is there any chance to say sonarqube that master branch is our developer branch? Or is there chance to analyze another branch than master? Why we want to analyze developer branch? Because we wan to provide quick feedback to developers. We merge from developer to master branch one per day. We don’t use git as branch per feature but only dev branch and master branch. Is there any chance? In TFVC we have this model too so we analyze dev branch to provide quick feedback to developer.

Hi, After installing the community versie 7.3 of SonarQube I got the same (following) problem with branches in TFS MSBuild integration (Note: I am not using GIT):

“Validation of project reactor failed: o To use the property “sonar.branch.name”, the branch plugin is required but not installed.”

Now I am a little bit lost in the information. Is there a way to solve this problem, or do I have to go back to versie 6.7.5?

Hope someone can help me?

Hi @Zefek,

Putting VSTS integration aside, yes you could virtually analyze another branch than master and pretend to SonarQube that that’s the main branch (you could even rename it in SQ settings from master to the actual name) bu not setting any sonar.branch.name.

The trick here is in the context of VSTS task:

Based on current implementation, I’m not sure that’s a possibility:

@Julien_HENRY is currently away, but I’ll defer to him for confirming these observations, and hope fully we can plan some improvements.

Hi @Adrie,

If you came directly from 6.7.5 then the behaviour you’re observing might not directly relate to 7.3 changes, but more to evolutions in 7.2 (with the advent of SonarQube Pull-Request support). I suggest you first verify the following:

The strategy is indeed to consider that ALM default branch = SonarQube main branch.

We have considered making the behavior configurable, but we were not sure it was needed. Maybe we should reconsider? Like having a field on the prepare task where users can set the name of the branch that should be considered as the SQ main branch (and by default, it would be the ALM default branch). @Chris WDYT?

1 Like