Differences between Sonar Manve plugin and sonar

We are currently using the utility sonar-scannerto run sonar analysis in our java multi-modules java project.

I wanted to go from sonar-scannerto sonar-maven-plugin, but the first tests show a big discrepancy in the reported indicators.

For example, the number of lines of code went from 466,000 to 154,000.

The main difference is that the maven plugin does not parse the src / test directories, while the scanner does this. Another reason may be that the maven module only parses the modules that are included.

Do you think this behavior seems normal to you?

or I missed some configuration in the plugin or scanner. Both of them should pull the configuration from our sonarqube server.

If this is normal behavior, should I stay with the scanner and save the history of indicators or start with the maven plugin? I could repeat some analysis for all the versions that we released to have some comparisons and trends.

Thanks for your advice.

Update: Settings for sonar sources and sonar inclusions, as mentioned here, give better results ...
sonar-maven-plugin: extending sonar.sources resources in a multi-module project

+4
source share

Source: https://habr.com/ru/post/1667150/


All Articles