|
Hello, I want to exclude few source code packages from being included in the jacoco code coverage report. As a test I specified a classname in the "sonar.jacoco.excludes" property but it did not help. The class was included in the code coverage report.
On googling more, I found two links - one which said that this issue is fixed while another issue on the same topic is unresolved. I would like to know if this feature works and if it does, how?
Thank you, Amit.
|
|
Hi Amit,
I did a test on my side and everything works as expected so could you provide a sample project to explain what your issue is ? Moreover do you confirm that you're using a Sonar 3.X version ?
Kind regards, Freddy
-----
Sonar for Continuous Inspection On Fri, Oct 26, 2012 at 6:40 AM, amit shah <[hidden email]> wrote:
|
|
Thanks for the reply Freddy.
I didn't understand what you meant by sample project. Basically the issue is if I specify a class name in "sonar.jacoco.excludes" property it does not get excluded from the code coverage report generated by jacoco. I can still see the line coverage for that class as 0%. I give the class name in this format - com.companyname.ui.MyBackingBean.
I am interested in using this property to exclude classes under one or more packages. Also about the sonar version. No we are not using 3.X version of sonar. We use 2.11. Do you mean to say that this property works only in 3.X versions of sonar?
Thanks, Amit. On Fri, Oct 26, 2012 at 7:18 PM, Freddy Mallet <[hidden email]> wrote: Hi Amit, |
|
Any inputs?
On Mon, Oct 29, 2012 at 11:23 AM, amit shah <[hidden email]> wrote: Thanks for the reply Freddy. |
|
Hi Amit,
You're facing limitation https://jira.codehaus.org/browse/SONAR-3295 which has been fixed with Sonar 3.0.
So indeed you must upgrade to Sonar 3.X. Kind regards -----
Sonar for Continuous Inspection
On Fri, Nov 2, 2012 at 5:51 PM, amit shah <[hidden email]> wrote: Any inputs? |
|
Hi Freddy,
First of all happy new year to Sonar's team. I'm facing the exact same issue : when excluding packages from jacoco coverage computation through Sonar's configuration panel, the coverage percentage for the selected packages drops to 0% which in turn lowers global coverage (which is not what I'm trying to achieve, I rather want to ignore some packages during analysis and report which should then increase global coverage). We are using Sonar 3.2 and the pattern I'm using is the following : *.exception.*:*.dto.* Thanks in advance for your help. Michel |
|
Hi Michel, When using Sonar 3.3.2 (but Sonar 3.2 should behave exactly the same way) with for instance sonar.jacoco.excludes=*impl*, I get the expected result (cf screenshot)
Do you also use this parameter sonar.jacoco.excludes ? Kind regards Freddy ![]() On Fri, Jan 4, 2013 at 3:11 PM, michel <[hidden email]> wrote: Hi Freddy, |
|
Hi again Freddy,
Sorry for the late reply. But I couldn't focus on this issue until now. When I use the pattern *.exceptions.*:*.dto.* the coverage appears as 0.0% and it is dispplayed in red in the trimap. When I use the pattern *exceptions*:*dto* there is no coverage information for the package and it is displayed in grey. Maybe there is a problem with dots in the exclusion pattern. Cheers, Michel |
|
By the way, yes I use the parameter sonar.jacoco.excludes .
Kind regards, Michel |
|
In reply to this post by Michel Pawlak
Hi Michel,
Could you please try to use pattern "*/exceptions/*:*/dto/*" ? In attachment you'll find what Freddy calls "example project" - this example demonstrates that this pattern works.
On Wed, Jan 30, 2013 at 3:20 PM, Michel Pawlak <[hidden email]> wrote: Hi again Freddy, Best regards, Evgeny Mandrikov aka Godin <http://godin.net.ru> http://twitter.com/_godin_ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Powered by Nabble | Edit this page |
