sfcgeorge / yard-contracts

YARD Plugin for Automatic Param Docs from Contracts.
MIT License
26 stars 3 forks source link

Different coverage results via yard command line and rake task #16

Open vdbijl opened 7 years ago

vdbijl commented 7 years ago

Context

I am trying to generate yard documentation with contract information. When I use the command line it reports that my doc coverage is 100%. When I use the yard rake task it reports that some lines with contracts have not been documented.

How to reproduce

On the command line I do: bundle exec yardoc lib/**/*.rb spec/**/*.rb --plugin contracts --private --no-cache --no-stats --markup=markdown

In the rakefile I use: YARD::Rake::YardocTask.new do |t| t.files = ['lib/**/*.rb', 'spec/**/*.rb'] t.options = ['--no-stats', '--markup=markdown', '--no-cache', '--plugin','contracts'] end

I am probably doing something wrong here. Anybody any idea what?

sfcgeorge commented 7 years ago

Hmm, I don't think I've done that before so I can't say off the top of my head.

Please do report back if you get the Rake task to report correctly and I'll add whatever you did to the Readme :)

vdbijl commented 7 years ago

I will try to debug it to figure out what goes wrong. Might just as well be a yard problem. Or something I did wrong... nah ;)

One step further. I found that the problem is only there for class methods. Sorry red herring, I do have a class method under contract in another project and there it works...