cnescatlab / sonar-cnes-report

Generates analysis reports from SonarQube web API.
GNU General Public License v3.0
470 stars 159 forks source link

Add summary data to excel report #131

Open agusmba opened 4 years ago

agusmba commented 4 years ago

First of all, thank you for making this tool! I tried it today, and saw that the excel report could be improved with data already present in the docx report

Expected behavior

The excel report includes summary metrics, such as

Quality Gate Reliability Security Maintainability Coverage Duplication

and

  Cyclomatic Complexity Cognitive Complexity Lines of code per file Comment density (%) Coverage Duplication (%)
Min 0.0 0.0 5.0 0.0 0.0 0.0
Max 0.0 0.0 0.0 0.0 0.0 0.0

and number of lines per language.

Actual behavior

This information is not present in the excel report

Steps to reproduce behavior

java --illegal-access=warn -jar sonar-cnes-report-3.2.2.jar \
         -t my-token -s https://my.sonar.server \
         -p "my-project-key" -o result

Detection version

sonar-cnes-report 3.2.2 (standalone) SonarQube version: 7.9.1

begarco commented 4 years ago

Hi @agusmba

What do you aim to do with high level metrics in the detailed issues files?

Until now, information are separated in two files:

I don't think duplicating data is necessary unless you have a use case (if you need to compute something from it you can retrieve it in the markdown file).

Nevertheless, what could be interesting to my mind would be to have metrics by file in the excel format or csv format. Would it be satisfying for you?

agusmba commented 4 years ago

Hi @begarco!

Thanks for the quick response.

My idea was to more easily prepare agregate charts of the quality of the different projects. Having the complete set of data in the excel file would make it easier to process since I wouldn't need to mix different sources. For instance systematically extracting info from the markdown file is not ideal. I agree with you that easily calculated metrics are not needed, but we'd need the raw data to calculate them in the excel file. For example there is no info on the Quality Gates, nor profiles.

My endgoal would be to calculate an aggregate and mean quality from a group of projects, and thought that with sonar-cnes-report I could get the individual project metrics.

I'm not sure if having the metrics per file would be enough (I confess I'm not an expert regarding sonarqube output). If having that is enough to calculate the report values, that could be ok.

It would be nice if the report part was more easily accesible for further transformation, such as it being available in excel too or maybe a simpler json format...

Sorry if this is out of scope, and thanks for being open to discussion.