In the VS code, the SonarLint extension is installed. Using connected mode my sonar server is configured. Added the project using the project binding option.
But when the analysis is run by raising PR in GitHub. The analysis is successfully done and visible in both UI not in the visual studio code.
I’m unable to find any notifications related to quality gate status even if the project binding is done.
So am I missing any configuration after project binding to get the notifications in vs code?
Hello @Avinash_Perikala !
Please specify your SonarLint for VSCode version, as well as your connection details - are you connected to SonarQube or SonarCloud? And which version?
Normally, you should be getting notifications in SonarLint whenever Quality Gate status changes, or whenever a new issue is assigned to you. Could you please double-check that you have notifications enabled by clicking
Edit connection, and verifying that the
receive notifications checkbox is selected?
If this is done and you still don’t have notifications, please provide us with logs from SonarLint output. (This page might be helpful).
All the best,
VS code version: 1.75.1 (User setup)
SonarLint version: v3.18.0
All setup was done in VS code and everything working fine but one query is
Will SonarLint give notifications like Quality Gate statuses for PR analysis?
Kindly detail it.
What server are you connected to? Is it SonarQube or SonarCloud? If SonarQube, which version?
Notifications will be sent on PR analysis as well if a Quality Gate status changes (from green to red or vice versa), or if there are new issues assigned to you. This is available on SonarQube Developer Edition (or above) starting from version 8.6, or SonarCloud.
If your setup satisfies all of this but you still don’t see notifications, please provide SonarLint output logs as specified above.
Hope that helps,
SonarQube 9.9 LTS
As I’ve got information from the sonar support that smart notifications for PR analysis is not there. Only notifications for the branch analysis is supported.
So, What is the confirmation I need to follow?
Hello @Avinash_Perikala, could you please detail what do you expect to see and what are you seeing in contrast?
As mentioned, you will only see the notification if Quality Gate status changes, or when a new issue is assigned to you.
All the best,
Hi @sophio.japharidze ,
- Installed SonarLint extension.
- SonarQube Connection is made.
- By clicking on + (Add project binding), It is asked a workspace. For that, I’ve created a folder in my local machine and cloned a GitHub repository, and added that folder as a workspace.
- After creating a workspace, by clicking on edit project binding, got all projects in my sonarqube server and selected same project which is added for workspace. (Using GitHub actions we are performing analysis)
- When I ran the analysis by raising a pull request in GitHub. The quality gate status is visible in sonarqube UI. But I’m unable to get the notifications in the VS code.
Please let me know the procedure I followed is correct or not ?
And two types of analysis will be done in sonarqube which is PR analysis(only new code changes) and branch analysis(overall code analysis).
In above two analysis for which we will get notifications in VS code notifications?
Looks like that indeed, “Quality Gate status change” notifications will be propagated only for main, or branch analysis. The new “issue assigned” notification should appear even for Pull Request analysis.
Your setup seems correct.
All the best,