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

Replace "Return" with "Returns" in API documentations #50613

Merged
merged 1 commit into from
Jan 6, 2024

Conversation

sato11
Copy link
Contributor

@sato11 sato11 commented Jan 6, 2024

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:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

Copy link
Member

@jonathanhefner jonathanhefner left a 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.

@@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is public. 👍

@sato11
Copy link
Contributor Author

sato11 commented Jan 6, 2024

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]>
@sato11 sato11 force-pushed the use-third-person-singular-form branch from 7dcec5e to 6bb829e Compare January 6, 2024 04:29
@jonathanhefner jonathanhefner merged commit fb56874 into rails:main Jan 6, 2024
4 checks passed
@jonathanhefner
Copy link
Member

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

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 git blame when there isn't much benefit.

Thank you, @sato11! ↩️

jonathanhefner added a commit that referenced this pull request Jan 6, 2024
Replace "Return" with "Returns" in API documentations [ci-skip]

(cherry picked from commit fb56874)
jonathanhefner added a commit to jonathanhefner/rails that referenced this pull request Jan 6, 2024
…form

Replace "Return" with "Returns" in API documentations [ci-skip]

(cherry picked from commit fb56874)
@sato11
Copy link
Contributor Author

sato11 commented Jan 6, 2024

Thanks for pointing it out @jonathanhefner, and thanks again for the review which must have been tedious 😢 I'll remember it 👍

@sato11 sato11 deleted the use-third-person-singular-form branch January 6, 2024 06:23
@sato11 sato11 mentioned this pull request Jan 6, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants