[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Is dcov working?

Jari Williamsson

2/14/2008 10:01:00 AM

I tried dcov (http://dcov.ruby...) for testing the quality of the
RDoc documentation. However, the only result I can get is whether a
method/class contains a comment or not (the comment can even be empty to
flag as valid!)

To be really useful, I would need a more "deep" analyze, such as length
of documentation, when there are code examples included, if :call-seq:
is used, etc. And when looking at the dcov sources, most of the
information I'm actually looking for seems to be supported by the file
dcov/generators/html/generator.rb (lines 51 to 54). But, non of that
information appear in the resulting coverage.html file.

Does anyone else get dcov to work regarding extended document coverage?
Or does anyone know of any alternative for document coverage testing of
Ruby sources?


Best regards,

Jari Williamsson

2 Answers

Jeremy McAnally

2/14/2008 3:14:00 PM

0

(I got your e-mail about this; I've just been quite busy :))

If you want to do any specific analysis, you'll need to write your own
analyzer and probably hack the generator. You can see the current
quality analyzer here:

http://dcov.ruby...svn/lib/dcov/analyzers/quality_a...

I'm going to hack on this in the next few weeks to make it really easy
to specify your own analyzers (a config file + command line param).
I've just had my head down in work/other projects/finishing up my
book, and I didn't think anyone actually used dcov. :P

Thanks,
Jeremy

On Thu, Feb 14, 2008 at 5:01 AM, Jari Williamsson
<jari.williamsson@mailbox.swipnet.se> wrote:
> I tried dcov (http://dcov.ruby...) for testing the quality of the
> RDoc documentation. However, the only result I can get is whether a
> method/class contains a comment or not (the comment can even be empty to
> flag as valid!)
>
> To be really useful, I would need a more "deep" analyze, such as length
> of documentation, when there are code examples included, if :call-seq:
> is used, etc. And when looking at the dcov sources, most of the
> information I'm actually looking for seems to be supported by the file
> dcov/generators/html/generator.rb (lines 51 to 54). But, non of that
> information appear in the resulting coverage.html file.
>
> Does anyone else get dcov to work regarding extended document coverage?
> Or does anyone know of any alternative for document coverage testing of
> Ruby sources?
>
>
> Best regards,
>
> Jari Williamsson
>
>



--
http://www.jeremymca...

My books:
Ruby in Practice
http://www.manning.com...

My free Ruby e-book
http://www.humblelittlerub...

My blogs:
http://www.mrneigh...
http://www.rubyinpra...

Jari Williamsson

2/15/2008 9:23:00 AM

0

Jeremy McAnally wrote:
> (I got your e-mail about this; I've just been quite busy :))
>
> If you want to do any specific analysis, you'll need to write your own
> analyzer and probably hack the generator. You can see the current
> quality analyzer here:
>
> http://dcov.ruby...svn/lib/dcov/analyzers/quality_a...

Thanks! Just putting it in the corresponding gem folder gave me quality
reports of both missing parameters and missing documentation for default
values. I'm not getting the report on missing examples to work, though.
(It seems like it's looking for keywords rather than looking for
RDoc-generated code chunks?)

I'll play around and see if I can add some things of my own to the
analyzer. For example, I noticed only "+#{param[0]}+" would flag as a
parameter documentation, but I think the "+#{param[0]}+:" pattern is
needed as well.

> I'm going to hack on this in the next few weeks to make it really easy
> to specify your own analyzers (a config file + command line param).

Great, looking forward to it! Since the analyzer and generator often
works in combo, it would be good to be able to specify both these
separately on the command line.

> I've just had my head down in work/other projects/finishing up my
> book, and I didn't think anyone actually used dcov. :P

Well, most Rubyists probably SHOULD use dcov! (At least everyone sharing
sources.) If dcov even can reach the stage where it can be seamlessly
integrated with editors/IDEs (such as: press a key to get a coverage
report of the current editor file, click in the report to directly take
you to the method/class/etc definition that lacks proper documentation),
you have a killer tool!

IMO, dcov together with really functional RDoc template tools (like the
Allison gem) are huge steps forward to provide excellent Ruby documentation!


Best regards,

Jari Williamsson


> On Thu, Feb 14, 2008 at 5:01 AM, Jari Williamsson
> <jari.williamsson@mailbox.swipnet.se> wrote:
>> I tried dcov (http://dcov.ruby...) for testing the quality of the
>> RDoc documentation. However, the only result I can get is whether a
>> method/class contains a comment or not (the comment can even be empty to
>> flag as valid!)
>>
>> To be really useful, I would need a more "deep" analyze, such as length
>> of documentation, when there are code examples included, if :call-seq:
>> is used, etc. And when looking at the dcov sources, most of the
>> information I'm actually looking for seems to be supported by the file
>> dcov/generators/html/generator.rb (lines 51 to 54). But, non of that
>> information appear in the resulting coverage.html file.
>>
>> Does anyone else get dcov to work regarding extended document coverage?
>> Or does anyone know of any alternative for document coverage testing of
>> Ruby sources?
>>
>>
>> Best regards,
>>
>> Jari Williamsson
>>
>>
>
>
>