Open aaronmallen opened 7 years ago
Are you sure it isn't configurable? Checkout the readme. Specifically...
ApiTag::PrivateMethod:
enabled: true
exclude: []
yeah I can reproduce this given options:
---
threshold: 95
rules:
ApiTag::Presence:
enabled: false
exclude: []
ApiTag::Inclusion:
enabled: false
exclude: []
ApiTag::ProtectedMethod:
enabled: false
exclude: []
ApiTag::PrivateMethod:
enabled: false
exclude: []
ExampleTag:
enabled: true
exclude: []
ExampleTag::ProtectedMethod:
enabled: false
ExampleTag::PrivateMethod:
enabled: false
ReturnTag:
enabled: true
exclude: []
Summary::Presence:
enabled: true
exclude: []
Summary::Length:
enabled: true
exclude: []
Summary::Delimiter:
enabled: true
exclude: []
Summary::SingleLine:
enabled: true
exclude: []
Foo.some_private_method: The public/semipublic method should have an example specified
Foo.some_private_method: The method summary should be specified
Foo.some_private_method: The @return tag should be specified
Even further verification... I tried:
---
threshold: 95
rules:
ApiTag::Presence:
enabled: false
exclude: []
ApiTag::Inclusion:
enabled: false
exclude: []
ApiTag::ProtectedMethod:
enabled: false
exclude: []
ApiTag::PrivateMethod:
enabled: false
exclude: []
ExampleTag::PublicMethod:
enabled: true
exclude: []
ExampleTag::ProtectedMethod:
enabled: false
exclude: []
ExampleTag::PrivateMethod:
enabled: false
exclude: []
ReturnTag::PublicMethod:
enabled: true
exclude: []
ReturnTag::ProtectedMethod:
enabled: false
exclude: []
ReturnTag::PrivateMethod:
enabled: false
exclude: []
Summary::Presence:
enabled: true
exclude: []
Summary::Length:
enabled: true
exclude: []
Summary::Delimiter:
enabled: true
exclude: []
Summary::SingleLine:
enabled: true
exclude: []
Foo.some_private_method: The public/semipublic method should have an example specified
Foo.some_private_method: The method summary should be specified
Foo.some_private_method: The @return tag should be specified
It would also appear it ignores private
in a class as well:
module Foo
class Bar
def some_public_function
'foo'
end
private
def some_private_method
'bar'
end
end
end
Foo::Bar.some_private_method: The public/semipublic method should have an example specified
Foo::Bar.some_private_method: The method summary should be specified
Foo::Bar.some_private_method: The @return tag should be specified
Relevant information:
spec.add_development_dependency 'yard', '~> 0.9'
spec.add_development_dependency 'yardstick', '~> 0.9'
$ ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin16]
$ yard -v
yard 0.9.8
$ yardstick -v
yardstick 0.9.9
Given a module:
Problem:
yardstick will require yardstick to be defined on private methods:
Expectation
yardstick should not require documentation on private methods.