Skipping coverage analysis and NOT resetting it to zero

257 views
Skip to first unread message

martin...@gmail.com

unread,
Apr 27, 2017, 12:19:50 PM4/27/17
to SonarQube
Hi,

is there a way to tell Sonar to leave code coverage untouched in case it wouldn't find any coverage reports? I am referring to recent Sonarqube (6.2+) analysing through the Maven plugin and jacoco.

Thank you

G. Ann Campbell

unread,
Apr 27, 2017, 1:58:10 PM4/27/17
to SonarQube, martin...@gmail.com
Hi,

The only way you're going to be able to accomplish this is by setting coverage exclusions.


Ann

martin...@gmail.com

unread,
Apr 28, 2017, 3:27:17 AM4/28/17
to SonarQube, martin...@gmail.com
This can be only set through the UI, or is there a command line switch? I am looking for a possibility to have coverage reports be updated only once a night and everything else more often.

G. Ann Campbell

unread,
Apr 28, 2017, 9:19:14 AM4/28/17
to martin...@gmail.com, SonarQube
Hi,

It sounds like you plan to run multiple analyses per day, and feed coverage information during only one of them...?

You do realize that if you set coverage data in Analysis1, and then run Analysis2 with coverage exclusions that won't retain the coverage data from Analysis1. Instead your coverage info will be overwritten with... blanks, I think.

Anyway, yes, this can be set in analysis properties.


Ann   



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/gyWRxcEy2k0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/35e1cf41-13e6-46aa-bab5-c021a4cf795f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

martin...@gmail.com

unread,
Apr 28, 2017, 9:26:58 AM4/28/17
to SonarQube, martin...@gmail.com
Yes, for me it is important to run analysis as soon as stuff gets merged to master, so that people can get quick feedback. Having integration test runs only once a day has other reasons, but sometimes things are as they are. The exclusions are not working because of what you are saying. A rather bad workaround could be recording stuff from the nightly analysis into a dedicated branch which would also give me to different values when for integration- and unit-tests (when keeping unit-test-only analysis in the immediate Sonarqube after merging to master) - which disappeared with version 6.2.


Am Freitag, 28. April 2017 15:19:14 UTC+2 schrieb G. Ann Campbell:
Hi,

It sounds like you plan to run multiple analyses per day, and feed coverage information during only one of them...?

You do realize that if you set coverage data in Analysis1, and then run Analysis2 with coverage exclusions that won't retain the coverage data from Analysis1. Instead your coverage info will be overwritten with... blanks, I think.

Anyway, yes, this can be set in analysis properties.


Ann   



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

On Fri, Apr 28, 2017 at 3:27 AM, <martin...@gmail.com> wrote:
This can be only set through the UI, or is there a command line switch? I am looking for a possibility to have coverage reports be updated only once a night and everything else more often.

Am Donnerstag, 27. April 2017 19:58:10 UTC+2 schrieb G. Ann Campbell:
Hi,

The only way you're going to be able to accomplish this is by setting coverage exclusions.


Ann

On Thursday, 27 April 2017 12:19:50 UTC-4, martin...@gmail.com wrote:
Hi,

is there a way to tell Sonar to leave code coverage untouched in case it wouldn't find any coverage reports? I am referring to recent Sonarqube (6.2+) analysing through the Maven plugin and jacoco.

Thank you

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/gyWRxcEy2k0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages