Versions Compared

Key

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

...

Table of Contents
Table of Contents

 

How does it work

SonarQube uses indexed folders and files of a project to assign issues and measures on. With a Java or C# project the source directory is scanned and indexed into SonarQube. After the files have been indexed an analyzer is run to scan 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. Therefore a property needs to be set sonar.blueriq.workingDir, where the BMA can create a folder structure that represents a blueriq project structure. This includes the repository and branch.

Running analysis

To the perform an analysis the command “mvn sonar:sonar” must be executed from a command prompt, in the directory where the pom.xml is located. When this command is executed, it will fetch a branch export from the management service 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.

Evaluating analysis results

When the analysis has finished the results can be viewed through a webbrowser of your choice, at http://<your-machine-name>:<port_number> for instance http://localhost:9000/

...

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

  • Issues
  • Measures
  • Code

Scope of analysis 

The Blueriq Model Analyzer plugin distinguishes between issues and measures.

Code 

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.

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.

...

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.

Measures

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

...

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.

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.

Issues 

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

...