-
Notifications
You must be signed in to change notification settings - Fork 122
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
Detach RBI header comment from top-level node (when generating YARD docs) #1885
Conversation
98be902
to
57b34bf
Compare
I'm on the fence about this change as it will clash with the Could you use this solution instead? lsegal/yard#484 (comment) |
That's a mighty large hammer, which breaks the YARD contract for the other ~200k lines of Ruby in the repo. I would rather disable |
You could add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you're right, those files are generated, we shouldn't care too much about Rubocop.
Thanks for your reconsideration @Morriar, i really appreciate it ❤️ |
Motivation
See Homebrew/brew#17167
When generating YARD docs that include both source and rbi files, the tapioca header overwrites the source comments for the file's top-level node.
Implementation
YARD detaches comments that have more than two newlines of separation from the source code that follows. Thus, I've added a blank line following the file header comment, and verified that the generated yard docs do not include the header.
Tests
Tests have been updated.