Skip to content

SonarQube

Ruben edited this page Jun 15, 2020 · 1 revision

SonarQube

This guide will show you how to run SonarQube for the DeX backend & frontend.

Backend

Prerequisites:

  1. Docker is installed - Recommended: Docker Desktop Overview
  2. SonarQube is installed - Recommended: SonarQube - Get Started in Two Minutes Guide
  3. Java SDK is installed and accesible via the following command:
java -version
  1. Dotnet Core SDK is installed and accesible via the following command:
dotnet --version

Installation of SonarScanner

Install SonarScanner for MSBuild

I recommend the following method:

dotnet tool install --global dotnet-sonarscanner --version 4.8.0

Run SonarScanner

  1. Open your SonarQube instance and create a project named: dex-backend
  2. Open terminal in root of project
  3. Run the following commands
dotnet sonarscanner begin /k:dex-backend
dotnet build
dotnet sonarscanner end 
  1. Navigate to your SonarQube panel (by default this is http://localhost:9000/)
  2. See the results

Frontend

Prerequisites:

  1. Docker is installed - Recommended: Docker Desktop Overview
  2. SonarQube is installed - Recommended: SonarQube - Get Started in Two Minutes Guide

Installation of SonarScanner

Install SonarScanner

Run SonarScanner

  1. Open your SonarQube instance and create a project named: dex-frontend
  2. Open terminal in root of project
  3. Run the following command
sonar-scanner
  1. Navigate to your SonarQube panel (by default this is http://localhost:9000/)
  2. See the results