Re: static clang source code analysis (Code Review Requested)

2012-12-10 Thread Miklos Vajna
Hi John,

On Fri, Dec 07, 2012 at 04:41:48PM +0100, John Smith lbalba...@gmail.com 
wrote:
 The clang analyzer how-to is here :
 http://wiki.documentfoundation.org/Development/Clang

Thanks a lot for both!

Miklos


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: static clang source code analysis (Code Review Requested)

2012-12-10 Thread John Smith
Hi,


So now that people know how to generate these reports, lets hope they
are going to be put to good use !
;)


- John Smith.

On Mon, Dec 10, 2012 at 9:19 AM, Miklos Vajna vmik...@suse.cz wrote:
 Hi John,

 On Fri, Dec 07, 2012 at 04:41:48PM +0100, John Smith lbalba...@gmail.com 
 wrote:
 The clang analyzer how-to is here :
 http://wiki.documentfoundation.org/Development/Clang

 Thanks a lot for both!

 Miklos
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: static clang source code analysis (Code Review Requested)

2012-12-07 Thread John Smith
Hi,


For the lcov reports, I put the following in the wiki:
http://wiki.documentfoundation.org/Development/Lcov
Feel free to try it out and edit it as you see fit.

Regards,


John Smith.



On Wed, Dec 5, 2012 at 5:33 PM, Miklos Vajna vmik...@suse.cz wrote:
 On Wed, Dec 05, 2012 at 04:15:45PM +0100, John Smith lbalba...@gmail.com 
 wrote:
 Sure, I can put short tutorials for generating both reports on the
 wiki. How do I get a wiki account, and where on the wiki should I put
 them ?

 Creating a wiki account:

 https://wiki.documentfoundation.org/index.php?title=Special:UserLogintype=signup

 I would create a page called
 http://wiki.documentfoundation.org/Development/Something, and link it
 from the Development page.

 Alternatively, just create two scripts that do the clang analysis / lcov
 report, and add it to git:

 http://wiki.documentfoundation.org/Development#Preparing_patches

 Thanks,

 Miklos

 ___
 LibreOffice mailing list
 LibreOffice@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/libreoffice

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: static clang source code analysis (Code Review Requested)

2012-12-07 Thread John Smith
Hi,


The clang analyzer how-to is here :
http://wiki.documentfoundation.org/Development/Clang

Regards,


John Smith.

On Fri, Dec 7, 2012 at 11:08 AM, John Smith lbalba...@gmail.com wrote:
 Hi,


 For the lcov reports, I put the following in the wiki:
 http://wiki.documentfoundation.org/Development/Lcov
 Feel free to try it out and edit it as you see fit.

 Regards,


 John Smith.



 On Wed, Dec 5, 2012 at 5:33 PM, Miklos Vajna vmik...@suse.cz wrote:
 On Wed, Dec 05, 2012 at 04:15:45PM +0100, John Smith lbalba...@gmail.com 
 wrote:
 Sure, I can put short tutorials for generating both reports on the
 wiki. How do I get a wiki account, and where on the wiki should I put
 them ?

 Creating a wiki account:

 https://wiki.documentfoundation.org/index.php?title=Special:UserLogintype=signup

 I would create a page called
 http://wiki.documentfoundation.org/Development/Something, and link it
 from the Development page.

 Alternatively, just create two scripts that do the clang analysis / lcov
 report, and add it to git:

 http://wiki.documentfoundation.org/Development#Preparing_patches

 Thanks,

 Miklos

 ___
 LibreOffice mailing list
 LibreOffice@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/libreoffice

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: static clang source code analysis (Code Review Requested)

2012-12-05 Thread John Smith
 Miklos Vajna vmiklos at suse.cz


Hi John,

 On Mon, Nov 05, 2012 at 02:45:22AM +0100, John Smith lbalbalba at gmail.com 
 wrote:
  Here's a clang static source code analysis of the latest git sources :
 
  http://dev-builds.libreoffice.org/clang_reports/master~2012-11-04_17.27.13/

 I know this is a clang report and not the lcov one, but -- can you
 please put up the commands you use to generate these reports to the
 wiki, or (maybe even better) add two scripts like
 bin/generate-lcov-report and bin/generate-clang-report, so that
 developers can easily create them, too?


Sorry for the late response.

Sure, I can put short tutorials for generating both reports on the
wiki. How do I get a wiki account, and where on the wiki should I put
them ?


- John Smith
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: static clang source code analysis (Code Review Requested)

2012-12-05 Thread Miklos Vajna
On Wed, Dec 05, 2012 at 04:15:45PM +0100, John Smith lbalba...@gmail.com 
wrote:
 Sure, I can put short tutorials for generating both reports on the
 wiki. How do I get a wiki account, and where on the wiki should I put
 them ?

Creating a wiki account:

https://wiki.documentfoundation.org/index.php?title=Special:UserLogintype=signup

I would create a page called
http://wiki.documentfoundation.org/Development/Something, and link it
from the Development page.

Alternatively, just create two scripts that do the clang analysis / lcov
report, and add it to git:

http://wiki.documentfoundation.org/Development#Preparing_patches

Thanks,

Miklos


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: static clang source code analysis (Code Review Requested)

2012-11-05 Thread Miklos Vajna
Hi John,

On Mon, Nov 05, 2012 at 02:45:22AM +0100, John Smith lbalba...@gmail.com 
wrote:
 Here's a clang static source code analysis of the latest git sources :
 
 http://dev-builds.libreoffice.org/clang_reports/master~2012-11-04_17.27.13/

I know this is a clang report and not the lcov one, but -- can you
please put up the commands you use to generate these reports to the
wiki, or (maybe even better) add two scripts like
bin/generate-lcov-report and bin/generate-clang-report, so that
developers can easily create them, too?

I'm asking as right now new testcases are usually added only for new
code. If we could generate the lcov report locally, then testcases could
be easily added for old code as well, and we could see the how the new
testcase improves coverage *before* pushing the (possibly pointless)
testcase.

Thanks,

Miklos
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: static clang source code analysis (Code Review Requested)

2012-11-05 Thread Norbert Thiebaud
On Mon, Nov 5, 2012 at 6:36 AM, Miklos Vajna vmik...@suse.cz wrote:
 I know this is a clang report and not the lcov one, but -- can you
 please put up the commands you use to generate these reports to the
 wiki, or (maybe even better) add two scripts like
 bin/generate-lcov-report and bin/generate-clang-report, so that
 developers can easily create them, too?

I've been playing with gcov/lcov

to get the coverage for a given module:

1/ build the product
2/ make module.clean
3/ gb_GCOV=YES make module
4/ run lcov on workdir/
5/ run genhtml
6/ enjoy :-)

7/ do not forget the make module.clean again after... otherwise the
link will fail later if you have gcov-enable object in a
non-gcov-enabled link (which also means that for static library it is
a bit more complicated)

Norbert
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: static clang source code analysis (Code Review Requested)

2012-11-05 Thread bfo
John Smith wrote
 Hi,
 Here's a clang static source code analysis of the latest git sources :
 http://dev-builds.libreoffice.org/clang_reports/master~2012-11-04_17.27.13/

Hi!
Is it comparable with the previous one? Hope you will update lcov one too.
Any chances to have those two updated on a regular basis?
Best regards.



--
View this message in context: 
http://nabble.documentfoundation.org/static-clang-source-code-analysis-Code-Review-Requested-tp4016826p4016962.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: static clang source code analysis (Code Review Requested)

2012-11-05 Thread Miklos Vajna
Hi Norbert,

On Mon, Nov 05, 2012 at 08:22:53AM -0600, Norbert Thiebaud 
nthieb...@gmail.com wrote:
 I've been playing with gcov/lcov
 
 to get the coverage for a given module:
 
 1/ build the product
 2/ make module.clean
 3/ gb_GCOV=YES make module

Fine till this. I assume at this stage the unit tests of module is
executed, and that will show up in the report. I tried this with
'writerfilter', then executed 'cd sw; make -sr slowcheck', which
executes the tests for writerfilter.

 4/ run lcov on workdir/

Seems this dies here with:

$ lcov -c -d workdir/
Capturing coverage data from workdir/
Found gcov version: 4.7.1
Scanning workdir/ for .gcda files ...
Found 113 data files in workdir/
Processing CxxObject/writerfilter/source/ooxml/OOXMLBinaryObjectReference.gcda
Out of memory!

Can you share what lcov switches did you use that worked for you? I get
this error ~instantly with 8G of ram, so it sounds a bit misleading.

Thanks,

Miklos
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: static clang source code analysis (Code Review Requested)

2012-11-05 Thread Norbert Thiebaud
On Mon, Nov 5, 2012 at 11:11 AM, Miklos Vajna vmik...@suse.cz wrote:
 Hi Norbert,

 On Mon, Nov 05, 2012 at 08:22:53AM -0600, Norbert Thiebaud 
 nthieb...@gmail.com wrote:
 I've been playing with gcov/lcov

 to get the coverage for a given module:

 1/ build the product
 2/ make module.clean
 3/ gb_GCOV=YES make module

 Fine till this. I assume at this stage the unit tests of module is
 executed, and that will show up in the report.

yes
 I tried this with
 'writerfilter', then executed 'cd sw; make -sr slowcheck', which
 executes the tests for writerfilter.

 4/ run lcov on workdir/

 Seems this dies here with:

 $ lcov -c -d workdir/
 Capturing coverage data from workdir/
 Found gcov version: 4.7.1
 Scanning workdir/ for .gcda files ...
 Found 113 data files in workdir/
 Processing CxxObject/writerfilter/source/ooxml/OOXMLBinaryObjectReference.gcda
 Out of memory!

 Can you share what lcov switches did you use that worked for you? I get
 this error ~instantly with 8G of ram, so it sounds a bit misleading.

I did not use any special flags...  but I only activated gcov for the
module 'basic'

lcov -c -d workdir/unxlngx6.pro/ -o gcov.list

on a box that has 8GB of memory too


also I running: LCOV version 1.9 I don't know it that makes a
difference, just thought I'd mention it :-)

Norbert
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


static clang source code analysis (Code Review Requested)

2012-11-04 Thread John Smith
Hi,


Here's a clang static source code analysis of the latest git sources :

http://dev-builds.libreoffice.org/clang_reports/master~2012-11-04_17.27.13/


Regards,


John Smith.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice