Quantcast

Implementing a parser for clover xml report, in cxx plugin

classic Classic list List threaded Threaded
45 messages Options
123
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Implementing a parser for clover xml report, in cxx plugin

Jorge Costa
Hi,

Im trying to feed some data into sonar for some c++ coverage (using bullseye, so converting this into clover using a application bullshtml). The idea here is to reuse also the cyclomatic complexity measure since the cppncss seems to fail often and mostly when finding c++11 standard code.

So now the problem, i have the code implemented  and able to retrieve everything except for the COVERED_CONDITIONS by line. If using the old BRANCH_HITS than the data is correctly show by sonar. Im tyring to get rid of the deprecated stuff from previous sonar plugins api.

CxxCloverSensor.java

Ive attached the file. hope someone can see what is going wrong.

Im using sonar 3.1 api.

Thanks in advance.

Jorge Costa
Best Regards
Jorge Costa
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Implementing a parser for clover xml report, in cxx plugin

Jorge Costa
Hi,

Ive changed a bit the code to use CoverageMeasuresBuilder in sonar plugins api.

Then i save the measure as in Jacoco plugin.
for (Measure indmeasure : fileMeasuresBuilder.createMeasures()) {                            
CxxUtils.LOG.debug("Save Measure : Line: '{}', Value: '{}'", indmeasure.getDescription(), indmeasure.getMetric());
                        context.saveMeasure(getFile(), indmeasure);          
}

In the log, i have the following data:

20:23:58.392 DEBUG            CxxPlugin - Saving coverage measures for file 'libgeometry/geometry.cpp'
20:23:58.392 DEBUG            CxxPlugin - Total : Line: '135'
20:23:58.392 DEBUG            CxxPlugin - Total : Conditions: '870'
20:23:58.392 DEBUG            CxxPlugin - Total : Line: '135'
20:23:58.393 DEBUG            CxxPlugin - Save Measure : Line: 'null', Value: 'Metric[id=<null>,formula=org.sonar.api.measures.SumChildValuesFormula@c9c6201,key=it_lines_to_cover,description=Lines to cover by Integration Tests,type=INT,direction=1,domain=Integration Tests,name=IT Lines to Cover,qualitative=false,userManaged=false,enabled=true,origin=JAV,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=true,deleteHistoricalData=true]'
20:23:58.393 DEBUG            CxxPlugin - Save Measure : Line: 'null', Value: 'Metric[id=<null>,formula=org.sonar.api.measures.SumChildValuesFormula@4beb2473,key=it_uncovered_lines,description=IT uncovered lines,type=INT,direction=-1,domain=Integration Tests,name=IT Uncovered Lines,qualitative=false,userManaged=false,enabled=true,origin=JAV,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=false,deleteHistoricalData=false]'
20:23:58.393 DEBUG            CxxPlugin - Save Measure : Line: 'null', Value: 'Metric[id=<null>,formula=<null>,key=it_coverage_line_hits_data,description=IT Code coverage line hits data,type=DATA,direction=0,domain=Integration Tests,name=IT Coverage Hits Data,qualitative=false,userManaged=false,enabled=true,origin=JAV,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=false,deleteHistoricalData=true]'
20:23:58.395 DEBUG .b.i.MemoryOptimizer - Remove data measure from memory: it_coverage_line_hits_data, id=939325
20:23:58.396 DEBUG            CxxPlugin - Save Measure : Line: 'null', Value: 'Metric[id=<null>,formula=org.sonar.api.measures.SumChildValuesFormula@70bdd2e7,key=it_conditions_to_cover,description=IT Conditions to cover,type=INT,direction=1,domain=Integration Tests,name=IT Branches to Cover,qualitative=false,userManaged=false,enabled=true,origin=JAV,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=true,deleteHistoricalData=true]'
20:23:58.396 DEBUG            CxxPlugin - Save Measure : Line: 'null', Value: 'Metric[id=<null>,formula=org.sonar.api.measures.SumChildValuesFormula@706a4d1a,key=it_uncovered_conditions,description=IT Uncovered conditions,type=INT,direction=-1,domain=Integration Tests,name=IT Uncovered Branches,qualitative=false,userManaged=false,enabled=true,origin=JAV,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=false,deleteHistoricalData=false]'
20:23:58.396 DEBUG            CxxPlugin - Save Measure : Line: 'null', Value: 'Metric[id=<null>,formula=<null>,key=it_conditions_by_line,description=<null>,type=DATA,direction=0,domain=Integration Tests,name=IT Branches by Line,qualitative=false,userManaged=false,enabled=true,origin=JAV,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=false,deleteHistoricalData=true]'
20:23:58.398 DEBUG .b.i.MemoryOptimizer - Remove data measure from memory: it_conditions_by_line, id=939326
20:23:58.398 DEBUG            CxxPlugin - Save Measure : Line: 'null', Value: 'Metric[id=<null>,formula=<null>,key=it_covered_conditions_by_line,description=<null>,type=DATA,direction=0,domain=Integration Tests,name=IT Covered Branches by Line,qualitative=false,userManaged=false,enabled=true,origin=JAV,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=false,deleteHistoricalData=true]'
20:23:58.401 DEBUG .b.i.MemoryOptimizer - Remove data measure from memory: it_covered_conditions_by_line, id=939327

As can be seen measures seem to be saved properly. When in sonar in clicking in coverage drilldow the file browser is correctly populated with the values from the file. The only thing missing is showing in the source code the branches to cover and uncovered branches. The lines to cover and uncovered lines show perfectly fine.

Im not sure if anyone has already tried this and wich plugin is using it.

Thanks

Jorge Cista
Best Regards
Jorge Costa
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Waleri Enns
In reply to this post by Jorge Costa
Hi Jorge,

sorry for the delay, see my comment below.

On 06/19/2012 08:28 PM, jmecosta wrote:
> Hi,
>
> Im trying to feed some data into sonar for some c++ coverage (using
> bullseye, so converting this into clover using a application bullshtml). The
> idea here is to reuse also the cyclomatic complexity measure since the
> cppncss seems to fail often and mostly when finding c++11 standard code.

two things pop up immediately in my mind:

1) There is already a patch which integrates code coverage via bullseye.
Look here:
http://jira.codehaus.org/browse/SONARPLUGINS-1756

2) Using bullseye as replacement for cppncss is certainly the wrong
idea. It will be another external dependency and, moreover, it is one
which is not available freely. Better idea (in fact, this is the plan so
far) is to replace the complexity analysis with own implementation on
top of our own AST-infrastructure.

Cheers,
--
Waleri Enns


>
> So now the problem, i have the code implemented  and able to retrieve
> everything except for the COVERED_CONDITIONS by line. If using the old
> BRANCH_HITS than the data is correctly show by sonar. Im tyring to get rid
> of the deprecated stuff from previous sonar plugins api.
>
> http://sonar.15.n6.nabble.com/file/n4999958/CxxCloverSensor.java
> CxxCloverSensor.java
>
> Ive attached the file. hope someone can see what is going wrong.
>
> Im using sonar 3.1 api.
>
> Thanks in advance.
>
> Jorge Costa
>
> --
> View this message in context: http://sonar.15.n6.nabble.com/Implementing-a-parser-for-clover-xml-report-in-cxx-plugin-tp4999958.html
> Sent from the Sonar dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Jorge Costa
Hi Waleri,

I started actually with the bullseye patch but for some reason it was not working that well in the projects. So i did my own implementation of the clover plugin since in our projects we have already bullseye converted to clover so i just tough i would give it a go. I did some modifications to this plugin to count the coverage only to the source available in the project rather than getting the overall coverage from the root xml. This gives a better idea of the coverage in individual projects. The complexity was just a bonus that ive tough i try since cppncss works miserably with c++11. The idea of having the complexity part of the plugin is something that im really hoping to come fast :)

But forget about all this, the main idea that i was trying to test was to get integration coverage for our projects. And this is something that cxx plugin should provide (I would say updating the bullseye and the gcovr sources to include this).

Now the main problem is exactly this, the decorator for the source code for condition coverage is not working for some reason. This should be something new since if reverting to the old BRANCH_HIT works.

Hope this clarifies a bit what i was trying to do, mostly learning a bit on how to write plugins.  

Still if you could try to check this integration coverage would be great.

Thanks

Jorge Costa
 
Best Regards
Jorge Costa
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Waleri Enns
Hi Jorge,

On 06/22/2012 08:56 PM, jmecosta wrote:

> Hi Waleri,
>
> I started actually with the bullseye patch but for some reason it was not
> working that well in the projects. So i did my own implementation of the
> clover plugin since in our projects we have already bullseye converted to
> clover so i just tough i would give it a go. I did some modifications to
> this plugin to count the coverage only to the source available in the
> project rather than getting the overall coverage from the root xml. This
> gives a better idea of the coverage in individual projects. The complexity
> was just a bonus that ive tough i try since cppncss works miserably with
> c++11. The idea of having the complexity part of the plugin is something
> that im really hoping to come fast :)
>
> But forget about all this, the main idea that i was trying to test was to
> get integration coverage for our projects. And this is something that cxx
> plugin should provide (I would say updating the bullseye and the gcovr
> sources to include this).
>
> Now the main problem is exactly this, the decorator for the source code for
> condition coverage is not working for some reason. This should be something
> new since if reverting to the old BRANCH_HIT works.
>
> Hope this clarifies a bit what i was trying to do, mostly learning a bit on
> how to write plugins.
>
> Still if you could try to check this integration coverage would be great.
I'll try to have a look within the next few days.

>
> Thanks
>
> Jorge Costa
>
>
> --
> View this message in context: http://sonar.15.n6.nabble.com/Implementing-a-parser-for-clover-xml-report-in-cxx-plugin-tp4999958p5000147.html
> Sent from the Sonar dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Jorge Costa
That's great, thanks. I was trying to get this to work to send you a patch to see if it can be used later for a  new version of the plugin (i mean the Bullseye patch).

So let me know how it goes when you have time.

Jorge Costa




Best Regards
Jorge Costa
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Waleri Enns
On 06/23/2012 06:37 PM, jmecosta wrote:
> That's great, thanks. I was trying to get this to work to send you a patch to
> see if it can be used later for a  new version of the plugin (i mean the
> Bullseye patch).
>
> So let me know how it goes when you have time.
Can you give me a sample report I can test it?

>
> Jorge Costa
>
>
>
>
>
>
> --
> View this message in context: http://sonar.15.n6.nabble.com/Implementing-a-parser-for-clover-xml-report-in-cxx-plugin-tp4999958p5000164.html
> Sent from the Sonar dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Jorge Costa
yep,

i will prepare a sample project tomorrow and send.

thanks

jc
Best Regards
Jorge Costa
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Jorge Costa
Hi again,

in attachment there is a zip file with a small test project and a clover.xml that can be use for testing/

Thanks

JCclover.zip
Best Regards
Jorge Costa
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Waleri Enns
In reply to this post by Jorge Costa
Hello Jorge,

now I finally realize what youre asking for ;)
Im sorry: I dont know whats wrong. What you may want to do is to compare
the values in question in the database for your implementation and for
one which works, i.e. java. Unfortunately, I cannot help you on that
(other stuff to do...)

Cheers,
--
Waleri


On 06/19/2012 08:28 PM, jmecosta wrote:

> Hi,
>
> Im trying to feed some data into sonar for some c++ coverage (using
> bullseye, so converting this into clover using a application bullshtml). The
> idea here is to reuse also the cyclomatic complexity measure since the
> cppncss seems to fail often and mostly when finding c++11 standard code.
>
> So now the problem, i have the code implemented  and able to retrieve
> everything except for the COVERED_CONDITIONS by line. If using the old
> BRANCH_HITS than the data is correctly show by sonar. Im tyring to get rid
> of the deprecated stuff from previous sonar plugins api.
>
> http://sonar.15.n6.nabble.com/file/n4999958/CxxCloverSensor.java
> CxxCloverSensor.java
>
> Ive attached the file. hope someone can see what is going wrong.
>
> Im using sonar 3.1 api.
>
> Thanks in advance.
>
> Jorge Costa
>
> --
> View this message in context: http://sonar.15.n6.nabble.com/Implementing-a-parser-for-clover-xml-report-in-cxx-plugin-tp4999958.html
> Sent from the Sonar dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Jorge Costa
This post was updated on .
Hi Waleri,

Not sure if i can do that since the metrics are different. However the cxx plugin eventually needs to be updated to use the new condition coverage metrics. I guess i will wait for this update than reuse it once it gets here or try to get this to work based on the Jacoco plugin.

By the way do you have any idea when this is planned to be done?

Thanks

Jorge Costa
Best Regards
Jorge Costa
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

pacotille
In reply to this post by Waleri Enns
Hello Waleri,

When Bullseye patches (Jorge's or/and mine) will be applied on trunk?


Thank you


Pacotille



-----Original Message-----
From: Waleri Enns [mailto:[hidden email]]
Sent: Friday,June 29,2012 10:57 AM
To: [hidden email]
Subject: Re: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Hello Jorge,

now I finally realize what youre asking for ;)
Im sorry: I dont know whats wrong. What you may want to do is to compare
the values in question in the database for your implementation and for
one which works, i.e. java. Unfortunately, I cannot help you on that
(other stuff to do...)

Cheers,
--
Waleri


On 06/19/2012 08:28 PM, jmecosta wrote:

> Hi,
>
> Im trying to feed some data into sonar for some c++ coverage (using
> bullseye, so converting this into clover using a application bullshtml). The
> idea here is to reuse also the cyclomatic complexity measure since the
> cppncss seems to fail often and mostly when finding c++11 standard code.
>
> So now the problem, i have the code implemented  and able to retrieve
> everything except for the COVERED_CONDITIONS by line. If using the old
> BRANCH_HITS than the data is correctly show by sonar. Im tyring to get rid
> of the deprecated stuff from previous sonar plugins api.
>
> http://sonar.15.n6.nabble.com/file/n4999958/CxxCloverSensor.java
> CxxCloverSensor.java
>
> Ive attached the file. hope someone can see what is going wrong.
>
> Im using sonar 3.1 api.
>
> Thanks in advance.
>
> Jorge Costa
>
> --
> View this message in context: http://sonar.15.n6.nabble.com/Implementing-a-parser-for-clover-xml-report-in-cxx-plugin-tp4999958.html
> Sent from the Sonar dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


*************************************************************************
This message and any attachments (the "message") are confidential, intended solely for the addressee(s), and may contain legally privileged information.
Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration.  
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or
falsified.
                              ************
Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et susceptibles de contenir des informations couvertes
par le secret professionnel.
Ce message est etabli a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration.
La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie.
*************************************************************************


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Jorge Costa
Hi Pacotille,

Ive actually  used also your patch and update it to include integration test and to use last sonar api 3.1. Please see this post http://sonar.15.n6.nabble.com/COVERAGE-in-Sonar-tp5000676.html.

Probably the best would be for you to check the patch and see if there is something in need of updating. Then we could as Waleri to try to push this into the trunk.

BR,

Jorge Costa
Best Regards
Jorge Costa
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

pacotille
Hi Jorge,


I will try to test your patch, I hope, before next week.


Pacotille


-----Original Message-----
From: jmecosta [mailto:[hidden email]]
Sent: Monday,July 09,2012 10:22 PM
To: [hidden email]
Subject: RE: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Hi Pacotille,

Ive actually  used also your patch and update it to include integration test
and to use last sonar api 3.1. Please see this post
http://sonar.15.n6.nabble.com/COVERAGE-in-Sonar-tp5000676.html.

Probably the best would be for you to check the patch and see if there is
something in need of updating. Then we could as Waleri to try to push this
into the trunk.

BR,

Jorge Costa

--
View this message in context: http://sonar.15.n6.nabble.com/Implementing-a-parser-for-clover-xml-report-in-cxx-plugin-tp4999958p5000707.html
Sent from the Sonar dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


*************************************************************************
This message and any attachments (the "message") are confidential, intended solely for the addressee(s), and may contain legally privileged information.
Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration.  
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or
falsified.
                              ************
Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et susceptibles de contenir des informations couvertes
par le secret professionnel.
Ce message est etabli a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration.
La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie.
*************************************************************************


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Waleri Enns
In reply to this post by Jorge Costa
Hi guys,

yes, it would be cool if you could agree on one implementation. I will
definitely look at those patches next week. One thought up front: maybe
we should consider to declare one data format as a 'standard' which will
then serve as a medium for all the coverage measuring tools out there.

On 07/09/2012 10:22 PM, jmecosta wrote:

> Hi Pacotille,
>
> Ive actually  used also your patch and update it to include integration test
> and to use last sonar api 3.1. Please see this post
> http://sonar.15.n6.nabble.com/COVERAGE-in-Sonar-tp5000676.html.
>
> Probably the best would be for you to check the patch and see if there is
> something in need of updating. Then we could as Waleri to try to push this
> into the trunk.
>
> BR,
>
> Jorge Costa
>
> --
> View this message in context: http://sonar.15.n6.nabble.com/Implementing-a-parser-for-clover-xml-report-in-cxx-plugin-tp4999958p5000707.html
> Sent from the Sonar dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

pacotille
Hello Waleri,

I did some quick tests on Jorge's patch. I only test BullsEye update in my environnement.
I think Jorge's update improves my last BullsEye patch.

In think the bullseyepatchwithcomplexityandintegrationcoverage.patch should be slip in small patchs (one by new feature).
The BullsEye patch should contain Jorge's :
CxxBullseyeCoverageSensor.java,
CxxPlugin.java,
CxxBullseyeCoverageSensorTest.java,
CxxPluginTest.java and bullseyecoverage-result-SAMPLE.xml.

The Jorge's BullEyes patch fully improve and replace my patch. So my patch not need to be use.

Pacotille





-----Original Message-----
From: Waleri Enns [mailto:[hidden email]]
Sent: Tuesday,July 10,2012 8:23 PM
To: [hidden email]
Subject: Re: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Hi guys,

yes, it would be cool if you could agree on one implementation. I will
definitely look at those patches next week. One thought up front: maybe
we should consider to declare one data format as a 'standard' which will
then serve as a medium for all the coverage measuring tools out there.

On 07/09/2012 10:22 PM, jmecosta wrote:

> Hi Pacotille,
>
> Ive actually  used also your patch and update it to include integration test
> and to use last sonar api 3.1. Please see this post
> http://sonar.15.n6.nabble.com/COVERAGE-in-Sonar-tp5000676.html.
>
> Probably the best would be for you to check the patch and see if there is
> something in need of updating. Then we could as Waleri to try to push this
> into the trunk.
>
> BR,
>
> Jorge Costa
>
> --
> View this message in context: http://sonar.15.n6.nabble.com/Implementing-a-parser-for-clover-xml-report-in-cxx-plugin-tp4999958p5000707.html
> Sent from the Sonar dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


*************************************************************************
This message and any attachments (the "message") are confidential, intended solely for the addressee(s), and may contain legally privileged information.
Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration.  
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or
falsified.
                              ************
Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et susceptibles de contenir des informations couvertes
par le secret professionnel.
Ce message est etabli a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration.
La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie.
*************************************************************************


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Jorge Costa

Here is the requested patch with bullseye only. bullseyepatch.patch

Ive made a few fixes since there were a few bugs in the analysis. So please lets us discuss how can we proceed with this
Best Regards
Jorge Costa
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Waleri Enns
Hi guys,

I will have a look at this tonight and reply afterwards.

Cheers,
--
Waleri

2012/7/19 jmecosta <[hidden email]>

Here is the requested patch with bullseye only.
http://sonar.15.n6.nabble.com/file/n5001063/bullseyepatch.patch
bullseyepatch.patch

Ive made a few fixes since there were a few bugs in the analysis. So please
lets us discuss how can we proceed with this


--
View this message in context: http://sonar.15.n6.nabble.com/Implementing-a-parser-for-clover-xml-report-in-cxx-plugin-tp4999958p5001063.html
Sent from the Sonar dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Waleri Enns
In reply to this post by pacotille
Hi guys,

I looked onto the patch and while I see several issues with the
implementation, I would like to first discuss our general approach to
integration of coverage tools.

Lets see the bigger picture. According to this page on Wikipedia

http://en.wikipedia.org/wiki/Code_coverage#Tools_for_C_.2F_C.2B.2B

there are at least to following coverage tools for C/C++:

- BullseyeCoverage
- Cantata++
- Gcov
- Insure++
- LDRA Testbed
- McCabe IQ
- NuMega TrueCoverage
- Tcov
- Tessy
- Testwell CTC++
- Trucov
- Parasoft C++test
- froglogic's Squish Coco
- RapiCover

Each of them having own pros/cons, own problems and solutions, own
nuances of invocation, dependencies on the build (usually you need a
special, "coverage enabled" build) etc. I'm not sure its the smartest
solution to teach the sonar plugin to prepare / invoke / parse each of
them. Maybe its smarter to declare some suitable standard *data format*
as our interface and map the output of tools, which dont produce reports
in this format natively.

For example, if youre would use Testwell CTC++ and our "standard" format
would be Cobertura XML, you would write code (a Python/Perl script or
something) which will convert the output of it to Cobertura which then
will be fed into Sonar using the C++ plugin.

Or, if we cannot find *one* suitable format which is feature-wise a
superset of all others, we can support two.

Not sure what those formats are and I'm not insisting on Cobertura XML.

WDYT?

--
Waleri

On 07/19/2012 12:02 PM, COCHERIL Mathias (EXT) wrote:

> Hello Waleri,
>
> I did some quick tests on Jorge's patch. I only test BullsEye update in my environnement.
> I think Jorge's update improves my last BullsEye patch.
>
> In think the bullseyepatchwithcomplexityandintegrationcoverage.patch should be slip in small patchs (one by new feature).
> The BullsEye patch should contain Jorge's :
> CxxBullseyeCoverageSensor.java,
> CxxPlugin.java,
> CxxBullseyeCoverageSensorTest.java,
> CxxPluginTest.java and bullseyecoverage-result-SAMPLE.xml.
>
> The Jorge's BullEyes patch fully improve and replace my patch. So my patch not need to be use.
>
> Pacotille
>
>
>
>
>
> -----Original Message-----
> From: Waleri Enns [mailto:[hidden email]]
> Sent: Tuesday,July 10,2012 8:23 PM
> To: [hidden email]
> Subject: Re: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin
>
> Hi guys,
>
> yes, it would be cool if you could agree on one implementation. I will
> definitely look at those patches next week. One thought up front: maybe
> we should consider to declare one data format as a 'standard' which will
> then serve as a medium for all the coverage measuring tools out there.
>
> On 07/09/2012 10:22 PM, jmecosta wrote:
>> Hi Pacotille,
>>
>> Ive actually  used also your patch and update it to include integration test
>> and to use last sonar api 3.1. Please see this post
>> http://sonar.15.n6.nabble.com/COVERAGE-in-Sonar-tp5000676.html.
>>
>> Probably the best would be for you to check the patch and see if there is
>> something in need of updating. Then we could as Waleri to try to push this
>> into the trunk.
>>
>> BR,
>>
>> Jorge Costa
>>
>> --
>> View this message in context: http://sonar.15.n6.nabble.com/Implementing-a-parser-for-clover-xml-report-in-cxx-plugin-tp4999958p5000707.html
>> Sent from the Sonar dev mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>       http://xircles.codehaus.org/manage_email
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>
>
> *************************************************************************
> This message and any attachments (the "message") are confidential, intended solely for the addressee(s), and may contain legally privileged information.
> Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration.
> Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or
> falsified.
>                                ************
> Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et susceptibles de contenir des informations couvertes
> par le secret professionnel.
> Ce message est etabli a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite.
> Tout message electronique est susceptible d'alteration.
> La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie.
> *************************************************************************
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Implementing a parser for clover xml report, in cxx plugin

Jorge Costa
Hi Waleri,

I personally like the way c# plugin is done, having an default parser and then auto detect the format of the report. This way i guess bullseye patch has a place in the plugin.

Currently the c# plugin supports opencover, dotcover, ncover, etc. This may be a way to go, and having for the next version of the plugin a gcov parser (default) and a bullseye parser gives a good coverage for tools on both unix and windows machines.

In the future based on the need other parser could be included.  But this is my opinion, since i dont have much experience in writing XLST converters :( and writing perl/python scripts is almost the same as having the code in the plugin i think.

Jorge





Best Regards
Jorge Costa
123
Loading...