Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yardsticks and yards coverage don't match #26

Open
NobbZ opened this issue Apr 6, 2015 · 0 comments
Open

yardsticks and yards coverage don't match #26

NobbZ opened this issue Apr 6, 2015 · 0 comments

Comments

@NobbZ
Copy link

NobbZ commented Apr 6, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant