Sunday, September 16, 2007

dcov 0.2.1 Released!

I just pushed a new version of dcov, the Ruby documentation analyzer, to the Rubyforge servers. This version adds a new analyzer setup and quality analysis. The new analyzers go from crazy scripts that pick through the guts of dcov and do a lot of stuff to slightly abstracted but much prettier scripts that use a nice DSL. For example, this is from the quality analyzer:



documentation_for_methods do |the_documentation|
the_documentation.must "document all parameters." do
param_names_for(the_documentation.token).each do |param|
the_documentation.token.reporting_data[:parameters_without_coverage] << param[0] unless the_documentation.token.comment.include?("+#{param[0]}+")
end if the_documentation.token.params
end
end



If you can't tell, I based the aesthetics of the analyzers on RSpec specs. They are nicer, but they should probably reveal less of the guts of dcov.


The basic analyzers that come with it work, but they're really supposed to be examples for you to work from (hence the nicer syntax for analyzers). Everyone has different documentation standards (placement of elements and units to be documented) with varying degrees of analness (some people aren't allowed to you direct address, for example). The included analyzers can give you a very basic idea of how your documentation is doing, but I'd like to see people develop new quality analyzers...possibly contributing back? :)


Enjoy and please e-mail me, IM me, or comment with any bug reports or problems. Or you can use that silly bug tracker thing.

1 comment:

Dale said...
This comment has been removed by the author.