Is dcov working?

J

Jari Williamsson

I tried dcov (http://dcov.rubyforge.org/) 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
 
J

Jeremy McAnally

(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.rubyforge.org/svn/lib/dcov/analyzers/quality_analyzer.rb

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

I tried dcov (http://dcov.rubyforge.org/) 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.jeremymcanally.com/

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

My free Ruby e-book
http://www.humblelittlerubybook.com/

My blogs:
http://www.mrneighborly.com/
http://www.rubyinpractice.com/
 
J

Jari Williamsson

Jeremy said:
(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.rubyforge.org/svn/lib/dcov/analyzers/quality_analyzer.rb

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,229
Latest member
GloryAngul

Latest Threads

Top