Make style-only changes to doc comments for the standard library. - #1
Open
bvenners wants to merge 1 commit into
Open
Make style-only changes to doc comments for the standard library.#1bvenners wants to merge 1 commit into
bvenners wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request makes style-only changes to documentation comments across the Scala standard library to improve consistency. The changes include: (1) converting imperative mood to indicative mood (e.g., "Return" → "Returns"), (2) adding terminal periods to initial sentences, and (3) wrapping code artifact names in backticks for proper rendering.
Key changes:
- Updated method documentation across multiple packages (
scala.util,scala.sys,scala.collection,scala.concurrent, etc.) - Converted ~500+ doc comment verbs from imperative to indicative mood
- Added backticks around type names, method names, and other code artifacts
Reviewed changes
Copilot reviewed 167 out of 167 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Multiple util files (Regex.scala, Try.scala, etc.) | Updated doc comments to use indicative mood and backticks for code elements |
| sys package files | Standardized documentation style across system utilities |
| collection package files | Updated extensive collection API documentation for consistency |
| concurrent package files | Improved Future/Promise documentation clarity |
| Multiple annotation files | Changed "Consult" to "See" for cross-references |
| Various other standard library files | Applied consistent style improvements throughout |
The changes are thorough and consistent with the stated goals. All modifications are to documentation only, with no functional code changes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bvenners
force-pushed
the
feature-scala2-mood-period-backticks
branch
2 times, most recently
from
December 20, 2025 22:48
f86493e to
1f180df
Compare
bvenners
force-pushed
the
feature-scala2-mood-period-backticks
branch
from
December 20, 2025 23:05
b0bfb0c to
75f14ca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The following style changes are made in this commit:
Only doc comments are changed, and only to make the above style changes.
Reasoning: Indicative mood is recommended over imperative mood by the Scaladoc Style Guide:
https://docs.scala-lang.org/style/scaladoc.html
Which says: Document what the method does do not what the method should do. In other words, say “returns the result of applying f to x” rather than “return the result of applying f to x”. Subtle, but important.
It is also what most Scaladoc comments in the standard library does, so this PR makes that consistent. It is also the way doc comments are written in Javadoc for the Java standard library. It is essentially writing the documentation as if you are explaining to a user (Returns something...) rather than an implementor (Return something...).
The terminating period is also used some of the time, but not always, in the existing doc comments for the standard library. This makes it consistent. Some phrases are not full sentences, but you can think of the subject as "implicit." "Returns true" means "This method returns true." Also if you have a bullet list where some of the items are complete sentences, and others not, the style guide (Chicago Manual of Style) I go by suggests putting periods after all items. And the Java standard library documentation seems to do this.
A few spots are missed in this PR, which I jotted down as I reviewed every changed file. But it hits most of them, so I'm hoping we can merge this into main and I can do further cleanup in later PRs.