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

Private tag (# @private) no longer working correctly #1170

Closed
JonRowe opened this issue May 29, 2018 · 3 comments
Closed

Private tag (# @private) no longer working correctly #1170

JonRowe opened this issue May 29, 2018 · 3 comments

Comments

@JonRowe
Copy link

JonRowe commented May 29, 2018

Hi, it seems the private tag (# @private) has stopped working for an inherited class on 0.9.13, we use this on RSpec to help us hide / ignore files that are internal workings not intended for direct manipulation, we also have a lint check enforcing we have 100% of our public API documented, since 0.9.13 this is now failing, see example: https://travis-ci.org/rspec/rspec-core/jobs/385051942 and the file in question: https://github.com/rspec/rspec-core/blob/7b6b9c3f2e2878213f97d6fc9e9eb23c323cfe1c/lib/rspec/core/formatters/json_formatter.rb

Steps to reproduce

Run bin/yard stats --list-undoc or bin/yard stats --list-undoc --no-private against rspec-core, see that file is incorrectly marked as undocumented.

Actual Output

Files:          34
Modules:        18 (    0 undocumented)
Classes:        37 (    1 undocumented)
Constants:       5 (    0 undocumented)
Attributes:     85 (    0 undocumented)
Methods:       259 (    8 undocumented)
 97.77% documented

Undocumented Objects:

(in file: lib/rspec/core/formatters/json_formatter.rb)
RSpec::Core::Formatters::JsonFormatter
RSpec::Core::Formatters::JsonFormatter#close
RSpec::Core::Formatters::JsonFormatter#dump_profile
RSpec::Core::Formatters::JsonFormatter#dump_profile_slowest_example_groups
RSpec::Core::Formatters::JsonFormatter#dump_profile_slowest_examples
RSpec::Core::Formatters::JsonFormatter#dump_summary
RSpec::Core::Formatters::JsonFormatter#message
RSpec::Core::Formatters::JsonFormatter#seed
RSpec::Core::Formatters::JsonFormatter#stop

Expected Output

Files:          34
Modules:        18 (    0 undocumented)
Classes:        37 (    0 undocumented)
Constants:       5 (    0 undocumented)
Attributes:     85 (    0 undocumented)
Methods:       259 (    0 undocumented)
100% documented

Environment details:

  • OS: OS X 10.13.4, Travis (Ubuntu 14.04 LTD)
  • Ruby version(s): 2.1, 2.2.10, 2.3.7, 2.4.4, 2.5.1
  • YARD version (yard -v): 0.9.13
@lsegal
Copy link
Owner

lsegal commented Jun 2, 2018

Looks like a regression in symbol parsing (via #1168) is causing symbols to incorrectly parse and probably leading to the full Ruby file parsing incorrectly too. I will look into this.

@lsegal lsegal closed this as completed in cd4452b Jun 3, 2018
@lsegal
Copy link
Owner

lsegal commented Jun 3, 2018

The regression was specific to symbols that used Ruby keywords as their symbol content, which was probably only affecting your JSON module. This will be fixed and a hotfix version pushed shortly.

lsegal added a commit that referenced this issue Jun 3, 2018
@JonRowe
Copy link
Author

JonRowe commented Jun 19, 2018

Thanks so much @lsegal

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