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

False undocumented methods, mangled parameters. #1101

Closed
woodruffw opened this issue Jul 1, 2017 · 3 comments
Closed

False undocumented methods, mangled parameters. #1101

woodruffw opened this issue Jul 1, 2017 · 3 comments

Comments

@woodruffw
Copy link

I'm having problems with my yardoc generated documentation in a particular file, which you can find here:

https://github.com/woodruffw/kbsecret/blob/945ee8ebc8d7d44580aaf3585bb744ce1037293a/lib/kbsecret/record/abstract.rb

Steps to reproduce

$ git clone https://github.com/woodruffw/kbsecret && cd kbsecret
$ yard

You can also see this bug in the rubydoc.info generated page.

Actual Output

The load!, initialize, and initialize_from_hash methods have their parameter lists mangled:

Furthermore, the actual documentation detail is missing for each (except for @note and @api private tags):



yard stats --list-undoc also incorrectly shows these methods as undocumented:

Files:          13
Modules:         2 (    0 undocumented)
Classes:        12 (    0 undocumented)
Constants:       4 (    0 undocumented)
Attributes:     10 (    0 undocumented)
Methods:        58 (    4 undocumented)
 95.35% documented

Undocumented Objects:

(in file: lib/kbsecret/record/abstract.rb)
KBSecret::Record::Abstract.load!
KBSecret::Record::Abstract#initialize_from_hash
KBSecret::Record::Abstract#data_fields
KBSecret::Record::Abstract#sensitive?

Expected Output

Expected: correctly presented parameter names, full documentation detail under each method, and each method recognized as documented.

Environment details:

  • OS: Linux (Ubuntu LTS 16.04)
  • Ruby version (ruby -v): ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux-gnu]
  • YARD version (yard -v): yard 0.9.9

I have read the Contributing Guide.

@woodruffw
Copy link
Author

I was able to "fix" this by removing all of the in-method comments in the type method, which makes me think that this is a manifestation of #1023.

Removing just the first one didn't work; each aligned comment had to be removed.

woodruffw added a commit to kbsecret/kbsecret that referenced this issue Jul 1, 2017
These comments were confusing YARD.

See lsegal/yard#1101
@lsegal lsegal closed this as completed in 5f36313 Jul 6, 2017
@woodruffw
Copy link
Author

Thank you!

@lsegal
Copy link
Owner

lsegal commented Jul 6, 2017

No problem, thanks for reporting this!

lsegal added a commit that referenced this issue Nov 18, 2017
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

2 participants