Git Product home page Git Product logo

sonarqube-pullrequest-decorator-plugin's Introduction

Archived

The functionality has been updated and merged into the original plugin and any issues you find should be opened against sonarqube-community-branch-plugin

Sonarqube Pull Request Decorator Plugin

A plugin for SonarQube to allow pull request decorations in the Community Edition.

NOTE This plugin is still a work in progress and should only be used for evaluation at this stage. There is an open discussion on whether to add support for pull request decorations directly in the sonarqube-community-branch-plugin. There is a possibility that the features of this plugin get pulled into that repository, depending on how the discussion moves forward.

Compatibility

The plugin requires SonarQube Community Edition version 7.8 or higher. sonarqube-community-branch-plugin is also a prerequisite for this plugin to work properly since it enables branch and pull request analysis with the Community Edition.

Installation

Either build the project or download a compatible release version of the plugin JAR. Copy the plugin JAR file to the extensions/plugins/ directory of your SonarQube instance and restart SonarQube.

Features

The plugin aims to support the features and parameters specified in the SonarQube documentation.

Bitbucket Server

The following properties is required to be set to enable the plugin for Bitbucket Server, and can be set either in conf/sonar.properties or through the user interface under Administration > General Settings > Pull Requests > Integration with Bitbucket Server

Property Description
sonar.pullrequest.bitbucket.endpoint The server endpoint. e.g https://bitbucket.company.com
sonar.pullrequest.bitbucket.token The Personal Access Token to authenticate with the Bitbucket Server API

sonarqube-pullrequest-decorator-plugin's People

Contributors

goober avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sonarqube-pullrequest-decorator-plugin's Issues

Wrong annotation path on Maven project

When decorating a Maven project PullRequest, the annotation path is set to project name (wopi-core in this example):

    {
      "reportKey": "com.github.goober.sonarqube.plugin.decorator",
      "externalId": "AXFjQ3PaPs6sIuLymv_G",
      "line": 300,
      "link": "https://<sonarUrl>/project/issues?id=fr.kosmos.wopi:wopi-core&pullRequest=5&open=AXFjQ3PaPs6sIuLymv_G",
      "message": "',' is not followed by whitespace.",
      "path": "wopi-core",
      "severity": "LOW",
      "type": "CODE_SMELL"
    }

In Sonar API, this issue has following payload:

      "key": "AXFjQ3PaPs6sIuLymv_G",
      "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAfterCheck",
      "severity": "MINOR",
      "component": "fr.kosmos.wopi:wopi-core:src/main/java/fr/kosmos/wopi/web/WebAbstractionService.java",
      "project": "fr.kosmos.wopi:wopi-core",
      "line": 300,
      "hash": "53a1de7f43f3cd86c88cb228d07e9504",
      "textRange": {
        "startLine": 300,
        "endLine": 300,
        "startOffset": 0,
        "endOffset": 111
      },
      "flows": [],
      "status": "OPEN",
      "message": "',' is not followed by whitespace.",
      "effort": "2min",
      "debt": "2min",
      "assignee": "prenom.nom",
      "tags": [],
      "creationDate": "2019-10-11T13:48:10+0200",
      "updateDate": "2020-04-10T10:44:00+0200",
      "type": "CODE_SMELL",
      "organization": "default-organization",
      "pullRequest": "5",
      "fromHotspot": false
    },

So the right path is the last part of component key, instead of second part used when mapping this property here:

Azure Devops not available as Pull requester provider

I have SonarQube 8 installed and branch community plugin installed. I cant find azure devops in the list of pull request providers on SonarQube Configuration Dashboard. I can successfully run PR but can see it decorate vulnerabilities. Please assist.

Global configuration is ignored

SonarQube version 7.9.2

Sonar properties contains:
sonar.pullrequest.bitbucket.endpoint=https://subdomain.domain.name
In Global > Configuration > Pull reuqest, the properties is overloaded with:
sonar.pullrequest.bitbucket.endpoint=https://anothersubdomain.domain.name

When running pull-requests analysis, it's subdomain is used instead of anotherdomain.
My use case is to validate Sonar on a staging environment with a diffrent Bitbucket URL.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.