-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Replace "Return" with "Returns" in API documentations #50613
Replace "Return" with "Returns" in API documentations #50613
Conversation
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.
Most of these comments are private, so I don't think they need to be changed. I commented on the two public ones though.
activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
Outdated
Show resolved
Hide resolved
@@ -256,7 +256,7 @@ def connection | |||
|
|||
attr_writer :connection_specification_name | |||
|
|||
# Return the connection specification name from the current class or its parent. | |||
# Returns the connection specification name from the current class or its parent. |
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.
This one is public. 👍
Thanks for the comments, @jonathanhefner! To confirm, you want me to discard the changes made to the private items, right? Let me confess that I'm not able to find it problematic to change all. So if you have more details behind your words, I'd like to hear it 🙂 (edit: I assume that it looked untrue to change all when the PR title says the change is over public documentations?) That said, I'm fine to limit the change only to the public ones 👍 So I'll work on it for now. |
The guidelines are explicit about how we should start sentences with "Returns" rather than "Return." So these instances should follow that way. See also the enhancements at rails#50595. Co-authored-by: Jonathan Hefner <[email protected]>
7dcec5e
to
6bb829e
Compare
Correct. Private comments are mostly exempt from the documentation guidelines because they are not public facing. So, for private comments, "Return" => "Returns" would be a cosmetic change, which we generally avoid. Another reason is to avoid noise in Thank you, @sato11! ↩️ |
Replace "Return" with "Returns" in API documentations [ci-skip] (cherry picked from commit fb56874)
…form Replace "Return" with "Returns" in API documentations [ci-skip] (cherry picked from commit fb56874)
Thanks for pointing it out @jonathanhefner, and thanks again for the review which must have been tedious 😢 I'll remember it 👍 |
Motivation / Background
The guidelines are explicit about how we should start sentences with "Returns" rather than "Return." So these instances should follow that way.
Additional information
See also the enhancements made at #50595.
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]