From: Jari Williamsson Date: 2008-02-15T18:23:24+09:00 Subject: Re: Is dcov working? 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.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 > On Thu, Feb 14, 2008 at 5:01 AM, Jari Williamsson > wrote: >> 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 >> >> > > >