bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cyclomatic code complexity report for gnulib


From: Simon Josefsson
Subject: Re: cyclomatic code complexity report for gnulib
Date: Tue, 07 Oct 2008 12:52:18 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Simon Josefsson wrote:
>> Using the pmccabe2html module I created a report for gnulib itself:
>> 
>> http://josefsson.org/gnulib-cyclo.html
>> 
>> Gnulib appears to trigger some bugs in the script on how the functions
>> are sorted, but the output may be interesting nonetheless.
>
> The legend talks about "untestable functions", and indeed the coloring
> of the functions is related to the amount of testing that is needed to
> get a reasonable coverage of their operations. We see near the top
>
>   function                  module
>
>   VASNPRINTF                vasnprintf
>   mem_cd_iconveh_internal   striconveh
>   re_search_internal        regex
>   context::diag             diffseq
>   strtod                    strtod
>
> and indeed these modules require a large testsuite. regex doesn't have a
> testsuite in gnulib, because we profit from glibc's testing. diffseq should
> better have a test as well, because GNU diff has no unit tests at all.
>
> However, the tool exaggerates the amount of testing needed for functions
> that have different implementations on different platforms, like
>
>   function                  module             implementations
>
>   create_pipe               pipe                     3
>   qcopy_acl                 acl                      7
>   execute                   execute                  3
>   qset_acl                  acl                      7
>   getloadavg                getloadavg              15

Right, the tool is simple and has its shortcomings.  Possibly the
explanations should be improved.  A link to wikipedia may help:
http://en.wikipedia.org/wiki/Cyclomatic_complexity

Any objections to installing the module in gnulib?

/Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]