Support binding the project on the branch/PR in VSCode

Hello,
is there a plan to support binding the project on the branch and possibly even pull request level?

Technically speaking - can the configuration below be interpreted by the ConnectedSonarLintEngine::downloadServerIssues the way we can fetch the result of the analysis from a more specific source?

"sonarlint.analyzerProperties": {
        "sonar.pullrequest.key":"4640",
        "sonar.pullrequest.branch":"release/18.0",
        "sonar.pullrequest.base":"master"
}

As it stands it seems like it’s not propagating these parameters at all:

[Debug - 11:34:10.237] fetchServerIssues projectKey=AHP_HRSFOREST_KEY:HRI, ideFilePath=src/channelclient/src/hrs/channelconfig/ChannelConfigClient_Init.cpp

[Debug - 11:34:10.245] GET 404 https://<internal_instance>/sonar/batch/issues?key=AHP_HRSFOREST_KEY%3AHRI%3Asrc%2Fchannelclient%2Fsrc%2Fhrs%2Fchannelconfig%2FChannelConfigClient_Init.cpp | response time=8ms

I saw a fairly recent update on sonarlint-core which is about changes requested in SLCORE-346.

That’s going to be great once it’s percolated through into VSCode extension. However, wouldn’t be great and go all the way and allow zooming on PR as well?

BTW: I can spend some time and work on this if needs be.

Cheers

Hello @Waldek_Herka and welcome to the community!

Thanks for your question. Recently we released new version of SonarLint for VSCode with branch synchronization. Here is the release post. Also we have a plan to add support of PR synchronization in future, but it’s not for the nearest time. It’s significantly more difficult than branches. You can find description of the feature on our wiki page on github. As you can see currently it works rather in auto mode than based on configuration as you suggest. Thank you for your idea. We will take into account this approach also.
Thank you for your interest to the feature.

BTW: If you are interested in IDE plugin development, may be you will find interesting the job section on our website :wink:

2 Likes