Add test results / code coverage later to sonar analysis

We want quick static code analysis feedback from Sonarqube to the developers.
Sonarlint is one approach, but the results always differ a bit to the analysis done by Sonarqube.

As Sonarqube needs the test results available before the sonar maven plugin is running, we have to postpone sonarqube analysis behind executing all tests which takes some time.

Ideally we could run the tests and sonar in parallel and then when the tests are finished attach the test results to the previous sonarqube analysis.

Kind regards,
Michael

4 Likes

Thank you Michael.
We took note if this insight and will continue to monitor it for interest.

@vivek.reghunath is there any progress on this?

We would also find this helpful.

One idea would be that sonar scanner could have a two-step approach.

  1. Scan everything / Z3 solve, etc. => produce analysis results as file.
  2. Attach extra reports (compiler warnings / test results / code coverage). & Upload

Right now scan and upload is done in one step, which prevents us from at least parallelizing here.