yardstick
yardstick copied to clipboard
yardsticks and yards coverage don't match
I have the following output:
$ rake yardstick
YARD-Coverage: 65.0% (threshold: 80%)
rake aborted!
YARD-Coverage must be at least 80% but was 65.0%
/home/nobbz/.rvm/gems/ruby-2.2.0/gems/yardstick-0.9.9/lib/yardstick/rake/verify.rb:108:in `assert_meets_threshold'
/home/nobbz/.rvm/gems/ruby-2.2.0/gems/yardstick-0.9.9/lib/yardstick/rake/verify.rb:55:in `verify_measurements'
/home/nobbz/.rvm/gems/ruby-2.2.0/gems/yardstick-0.9.9/lib/yardstick/rake/verify.rb:81:in `block in define'
Tasks: TOP => yardstick
(See full trace by running task with --trace)
$ rake doc
Files: 5
Modules: 1 ( 1 undocumented)
Classes: 4 ( 4 undocumented)
Constants: 3 ( 3 undocumented)
Methods: 10 ( 1 undocumented)
50.00% documented
The rake
-tasks are defined as follows:
require "yard"
YARD::Rake::YardocTask.new(:doc) do |t|
t.files = ['lib/**/*.rb']
t.files += ['-', 'README.md',
'LICENSE.txt',
'CODE_OF_CONDUCT.md']
t.options = ['--markup-provider=redcarpet',
'--markup', 'markdown']
end
require 'yardstick/rake/verify'
Yardstick::Rake::Verify.new(:yardstick) do |v|
v.threshold = 80
end
So as you can see, yardstick finds 15% more of my code documented than yard self does.