Uploaded image for project: 'Product Roadmaps'
  1. Product Roadmaps
  2. MMF-954

"Developer Pack" brings valuable notifications to developers through SonarLint

    XMLWordPrintable

    Details

    • Type: EPIC
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Labels:
    • Epic Name:
      Personalized notifications in SonarLint

      Description

      Context

      As a developer, when I'm developing in my favorite IDE, I don't want to leave my IDE to be notified about some interesting events that happen on SonarQube.
      With the help of SonarLint, I want by default to receive notifications when:

      • the Quality Gate status (failed / success / warning) of my current open project(s) changes
      • with the integration of a new analysis report, SonarQube finds some new issues introduced by me in my current project(s)

      I also want to be able to receive notifications (disabled by default) when:

      • the Quality Gate status of one of my favorite projects changes
      • with the integration of a new analysis report, SonarQube finds some new issues introduced by somebody else in my current project(s)
      • with the integration of a new analysis report, SonarQube finds some new issues introduced by me whatever the project
      • a new issue is assigned to me, or an issue that is assigned to me is updated with, for example, a new comment.

      I expect from each notification to be able to quickly move to the SonarQube UI either to classify/comment the new issues or to better understand what happens on the leak period.

      I want to be able to activate / deactivate notifications from the IDE.

      Of course, I expect the notification to appear quickly after that the event has happened in SonarQube and only one time.
      And, if I don't want to deal with an event when I receive the notification or if I simply missed it, I expect to be able to see a recap of all the messages.

      Solution

      Request to the server

      To use the connected mode, the developer configures the connection to the SonarQube server, setting the server URL and providing his credentials. SonarLint then requests the server on a periodic basis (every minute) to check if a new event has to be presented to the user.
      The request provides:

      • user's credentials (which are used by SonarQube to authorize and identify the developer)
      • the time of the latest check
      • the list of projects (project keys) that are opened in the IDE

      In the answer, SonarLint can get 2 events for each project:

      • the latest change of the Quality Gate status since last check was done
      • the number of new (unresolved) / updated issues since last check was done

      Of course, if an open project is part of the favorite projects, the answer doesn't contain twice the event.
      And, in any case, the events that are returned are limited to:

      • the changes that occur during the leak period of the project
      • new "unresolved" issues

      When IDE starts, the same mechanism applies and the events provide the latest change of the Quality Gate status as well as the number of new / updated issues since the developer has closed his IDE.
      Best would be to have an event only if the Quality Gate status is different from what is was when the previous check was done. But, to keep it simple, we can have an event with the latest change of Quality Gate status as soon as there was a change.

      Notification

      For each event, a notification is displayed in the IDE which contains:

      • a category: Quality Gate or Issue - can be represented by an icon
      • the impacted project(s): an open project, a favorite project, another project - can be represented by an icon
      • a description, eg.
        • the Quality Gate of your project [My project] on SonarQube is now red.
        • 3 new issues have been detected on SonarQube in the code you've recently added to the project [My other project].
      • a link to SonarQube that can be invoked by clicking on the notification:
        • for a change of Quality Gate, it redirects to the project homepage.
        • for new or updated issues, it points to the project issues page, with the corresponding set of issues selected and the code viewer opened on the first issue.
      Configuration

      In the settings of SonarLint, the developer can choose to receive or not the notifications. This option can be offered while configuring / editing the connection to SonarQube.
      When the "developer pack" is not activated on SonarQube, configuration should be disabled but still visible so that developers can know that the feature exists.

      In the settings of SonarQube, the developer can choose which notifications he wants to receive:

      • a change of Quality Gate for the open project(s) (activated by default)
      • my new issues in the open project(s) (activated by default)
      • all new issues in the open project(s) (disabled by default)
      • a change of Quality Gate for my favorite projects (disabled by default)
      • my new issues in all the projects (disabled by default)
      • new / updated issues assigned to me (disabled by default)

      And, when activating/deactivating the notifications in his IDE, the developer has a link to go to the notifications settings in SonarQube.

      Steps

      A first step will consist in showing notifications only for:

      • a change of Quality Gate for the open project(s)
      • my new issues in the open project(s)

      And with this first step,

      • the developer will just have the choice to receive or not the notifications (activate/deactivate), without being able to choose between the notifications.
      • we won't implement any specific mechanism to display the list of notifications. Either it will be provided by default by the IDE, or it won't be available.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              christophe.levis Christophe Levis
              Reporter:
              freddy.mallet Freddy Mallet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: