sonar-cnes-report: Reporting from SonarQube made of ease.

Giannakopoulosj
2 min readJun 25, 2023

--

SonarQube is an open platform to manage code quality. sonar-cnes-reportcan export code analysis from a SonarQube server as a docx, xlsx, csv, markdown, and text files.

sonar-cens-report is a tool that will help to transform SonarQube findings into useful reports, manipulate them, distribute them as needed withing your organization. The project itself is really self-explanatory, the usefully quick-start guide. My sole purpose is to suggest a SonarQube reporting tool and help you evaluate is usage.

Install the sonar-cens-report

We need a working JRE installation ≥ 1.8 and to download the jar file directly from GitHub: https://github.com/cnescatlab/sonar-cnes-report

It works in two modes:
1. As a CLI command. Useful if you want to integrate it within CI/CD.
2. As SonarQube Plugin in case non-tech people want to generate reports.

In our example, we will upload to a local SonarQube installation the sonar scan report of the sonar-cnes-report itself, and we will explore the CLI command

Create a sonar-cens-report of your project

java -jar sonar-cnes-report-4.2.0.jar -s http://localhost:9000 -t squ_xxxxxxxxx -p fr.cnes.sonar:cnesreport -o demo-cner-sonar-report
  • -s http://localhost:9000: provide url of the SonarQube
  • -t squ_XxXxXxXx: provide a user token to generate the report
  • -p fr.cnes.sonar:cnesreport: provide the ProjectKey
  • -o demo-cner-sonar-report: the output file
CLI repot generation

Several reports will be generated in DOCX, XLSX, md and csv formats, as well it will download the SonarQube profile in the config directory.

Generated Reports in the output directory

Opening the xlsx and docx report and analysis will give us insight about the Project:

Analysis
Report

--

--

Giannakopoulosj

I’m a seasoned DevOps Engineer. This notepad serves as a repository for my daily ideas, solutions, and proof of concepts