Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The main application of SonarQube, where your analysis projects are stored and can be viewed. It also houses registered SonarQube Plugins.

SonarQube Plugin

A SonarQube Plugin plugin is an extension for SonarQube. A plugin makes its possible to analyse language specific source code, and , which can analyse source code. SonarQube delivers plugins for a variety of language, such as Java and C#. These  SonarQube delivers a couple plugins out of the box. These plugins perform the analysis of your source code projectsand sends analysis to the SonarQube Server.

SonarQube Scanner

A SonarQube Scanner scanner is a tool to execute your source code analysis. SonarQube delivers a scanners for a variety of build systems, such as Maven and MSBuild. You configure a Scanner to execute your source code analysis. A Sonar scannerThe scanner will fetch all registered plugins from the SonarQube Server, and will give the configured source code to every plugin so that the plugin can runs its analysis.

SonarQube Quality Gate

See Quality gate.

Blueriq Model Analyzer

The Model Analyzer consist out of three components. A SonarQube Plugin, SonarQube a Scanner and SonarQube a Quality Gate.  

SonarQube uses indexed directories and files of a project to assign issues and measures on. With Java or C# project the source directory is scanned and indexed into SonarQube.

After the files have been indexed an Sonarqube Plugin analyzer is run to analyze the files for issues and collects its measures. Since Blueriq doesn't work with a source directory but with a branch export from the Management Service, we need to create our own folder structure. Therefor we have created owe a property needs to be set blueriq.scanner.workingDirectory, where the BMA can create a folder structure that represents a blueriq project structure. This includes the repository and branch.

...

The SonarQube Scanners index the gives source code directories and files, so it can report its analysis on those indexed files. Since Blueriq Models live in the Blueriq Studio and does not consists out files, we needed to create our own scanner. The scanner creates directories and files structure which represents your Blueriq project structure including the repository and branch. After this the scanner works just like every other SonarQube Scanner.

Scope of the analysis 

The Model Analyzer can only analyze the content of project which are created in the project itself. For more information see Analysis Scope.

Configure analysis

The Blueriq Sonar Scanner needs to be configured to read your Blueriq Model of interest. Blueriq Sonar Scanner takes care of this by reading a application.properties file. See Configuring Sonar Scanner on how to setup your application.properties file.

Running analysis

To the perform an analysis the command mvn sonar:sonar"java -jar bma-sonar-scanner.jar -Dspring.config.location=file:./application.properties" must be executed from a command prompt, in the directory where the pom.xml is locatedapplication.properties resides. When this command is executed, it will either fetch a branch export, from the management service or from a configured location, and run analysis on it. When the analysis is done the command prompt will inform that the analysis was successful.

...

All the required properties must be set, otherwise the command prompt will show which properties aren't set.

Image RemovedImage Added

Evaluating analysis results

...

Analyzed projects are shown under Projects and are clickable to acquire more in depth insight.:

Image RemovedImage Added

After clicking on the project, a new screen will appear with three tabs to browse through the analysis results:

...

The third tab in the upper left corner, called Code, gives you an overview of your projects . When clicking on "Open Component's Page" button in front a project (highlighted in red in the image), the focus will move to that project and its homepage with be displayed, showing only its measures. The breadcrumbs trail at the top of the page will also be updated.

Image Removed

Single-project and multi-project

When scanning a single project with source code and filled properties for the BMA, the BMA will create a new source directory in SonarQube under the existing code project. All the previous issues and measures from the source code project will still exist and a new source directory will be shown inside SonarQube with name workingDir/repository/branch/project.

Image Removed

When scanning a multi-project solution, the BMA will create a new sub project under the root project. SonarQube will only scan files when there on project with no other sub projects. Therefore the BMA creates a sub project under the root project where is can register its own source directory and issues and measures.

Image Removed

and it's quality. 

Image Added

When selecting a project will go one level deeper and display the code smells that are detected on specific modules.

Image AddedImage Removed

Measures

The Blueriq Model Analyzer is capable of calculating the following measures:

...

You can view the measures of your Blueriq Model by clicking the Measures tab in the upper left corner of your screen, calculated measures are shown at the bottom of the screen:

When a project/folder is selected, the measures of the project/folder and all its modules are displayed. Custom measures will also be displayed in the list of all the other measures.

Image Removed

in sidebar under the section size:

Image Added

Module measures

The BMA indexes projects and modules as files in SonarQube. If you want to see module specific measures you will need to open a file in SonarQube and click on show measures.

Image RemovedImage Added

Issues 

The Blueriq Model Analyzer is capable of detecting the following issues:

...

You can view the issues of your Blueriq Model by clicking the Issues tab in the upper left corner of your screen:

Image RemovedImage Added

Also see:

Rule Parameters