View on GitHub

CAT Lab

CNES Code Analysis Tools Laboratory

Docker CAT - Code Analysis Tools

Presentation

Docker-CAT (Code Analysis Tool) is a major tool in our repository, which is embedded and released in a Docker Image.

It is based on SonarQube, and upgraded by some of our tools so you can easily analyse code and verify its quality. For instance, Docker-CAT includes sonar-cnes-report to add the ability to export all results in docx, excel, markdown or csv. This all-in-one solution is configured with CNES standards by default, so, if you work with CNES, you can use it directly to check your code. Otherwise, feel free to insert your own Quality Profiles.

Docker cat can analyse the following languages :

In Docker-CAT, every task can be done with the web interface, so that it can be easily used by anybody. Moreover, if you open the sonarqube port (default:9000) in your firewall, it can be accessed by any computer. (Users should also have an access to the shared directory).

Approximately, it works as follows :

  1. The user puts project source code inside a directory shared with Docker.
  2. Through the web interface, he uses the cnes-scan plugin.
  3. After completing the form, he can launch the analysis.
  4. The results will then be available inside the web interface.
  5. The user will also be able to generate reports in various format (docx, excel, etc.), thanks to the cnes-report.

The following picture sums up the use of Docker-CAT. Cat summary

More details in the user guide. More technical details in the technical guide.

Tools included in Docker-CAT

DOCKER-CAT
Sonarqube 6.7.4 (LTS) or 7.9 (LTS) sonar-cnes-scan-plugin
Add a new UI in sonar to start code Analysis with CNES guidelines.
sonar-cnes-export-plugin
Let you export sonarqube configuration.
sonar-cnes-python-plugin
Add possibility to analyse Python code.
sonar-cnes-report
Let you generate some reports.
Can be used as sonar-plugin or throught command line.
sonar-cnes-cxx-plugin
Let you analyse C/C++ code.
sonar-frama-c-plugin
Let you import Frama-C results in SonarQube.
sonar-icode-cnes-plugin
Let you import i-Code results in SonarQube.
And other tools...
There is also some other tools, but not from lequal. You can get complete list here.

Architecture

The SonarQube platform is made of 4 major components :

You can find more details on the SonarQube official documentation.

SonarQube summary

Quality with SonarQube

The picture below shows the key concepts introduced by SonarQube, which are important in order to understand the results of your analysis. SonarQube Quality Features