Bruno Haible <[EMAIL PROTECTED]> 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