Correct Documentation Typos - #2300
Conversation
📝 WalkthroughWalkthroughThe API reference documentation corrects public declarations, const and bool parameter types, return types, error values, HTTP anchors, and spelling or duplication errors across multiple files. ChangesAPI documentation corrections
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/ref/api/http.md`:
- Line 444: Update the documentation sentence near the asynchronous operation
description to use “retrieved” instead of “retried,” accurately describing that
nng_aio_get_output obtains the connection from _aio rather than retrying it.
- Line 5: Update the documentation sentence describing WebSocket connections to
hyphenate the compound modifier, changing “WebSocket based connections” to
“WebSocket-based connections.”
- Around line 178-179: Update the rows for NNG_HTTP_STATUS_SERVICE_UNAVAILABLE
and NNG_HTTP_STATUS_GATEWAY_TIMEOUT to include the table’s fourth Notes column,
using an empty cell or an appropriate note while preserving the existing status
values and descriptions.
In `@docs/ref/api/sock.md`:
- Line 306: Update the sentence beginning “Socket options are used” to hyphenate
the compound modifier as “higher-level protocol,” leaving the rest of the
wording unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: cf3145c8-a22e-43fb-b0f6-2a72286629a8
📒 Files selected for processing (10)
docs/ref/api/aio.mddocs/ref/api/ctx.mddocs/ref/api/errors.mddocs/ref/api/http.mddocs/ref/api/init.mddocs/ref/api/logging.mddocs/ref/api/msg.mddocs/ref/api/pipe.mddocs/ref/api/sock.mddocs/ref/api/synch.md
| NNG offers support for creation of HTTP clients, and servers. NNG supports HTTP/1.1 at present, and supports | ||
| a subset of functionality, but the support should be sufficient for simple clients, REST API servers, static content servers, | ||
| and gateways between HTTP and and other protocols. It also provides support for WebSocket based connections. | ||
| and gateways between HTTP and other protocols. It also provides support for WebSocket based connections. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use a hyphen in the compound modifier.
Change WebSocket based connections to WebSocket-based connections.
Proposed fix
-WebSocket based connections
+WebSocket-based connections📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| and gateways between HTTP and other protocols. It also provides support for WebSocket based connections. | |
| and gateways between HTTP and other protocols. It also provides support for WebSocket-based connections. |
🧰 Tools
🪛 LanguageTool
[grammar] ~5-~5: Use a hyphen to join words.
Context: .... It also provides support for WebSocket based connections. HTTP follows a reque...
(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/ref/api/http.md` at line 5, Update the documentation sentence describing
WebSocket connections to hyphenate the compound modifier, changing “WebSocket
based connections” to “WebSocket-based connections.”
Source: Linters/SAST tools
| | `NNG_HTTP_STATUS_SERVICE_UNAVAILABLE`<a name="NNG_HTTP_STATUS_SERVICE_UNAVAILABLE"></a> | 503 | Service Unavailable | | ||
| | `NNG_HTTP_STATUS_GATEWAY_TIMEOUT`<a name="NNG_HTTP_STATUS_GATEWAY_TIMEOUT"></a> | 504 | Gateway Timeout | |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Complete the four-column table rows.
The table defines a Notes column, but these two rows contain only three cells. Add an empty fourth cell or a note to avoid markdownlint MD056 warnings.
Proposed fix
-| `NNG_HTTP_STATUS_SERVICE_UNAVAILABLE`<a name="NNG_HTTP_STATUS_SERVICE_UNAVAILABLE"></a> | 503 | Service Unavailable |
-| `NNG_HTTP_STATUS_GATEWAY_TIMEOUT`<a name="NNG_HTTP_STATUS_GATEWAY_TIMEOUT"></a> | 504 | Gateway Timeout |
+| `NNG_HTTP_STATUS_SERVICE_UNAVAILABLE`<a name="NNG_HTTP_STATUS_SERVICE_UNAVAILABLE"></a> | 503 | Service Unavailable | |
+| `NNG_HTTP_STATUS_GATEWAY_TIMEOUT`<a name="NNG_HTTP_STATUS_GATEWAY_TIMEOUT"></a> | 504 | Gateway Timeout | |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | `NNG_HTTP_STATUS_SERVICE_UNAVAILABLE`<a name="NNG_HTTP_STATUS_SERVICE_UNAVAILABLE"></a> | 503 | Service Unavailable | | |
| | `NNG_HTTP_STATUS_GATEWAY_TIMEOUT`<a name="NNG_HTTP_STATUS_GATEWAY_TIMEOUT"></a> | 504 | Gateway Timeout | | |
| | `NNG_HTTP_STATUS_SERVICE_UNAVAILABLE`<a name="NNG_HTTP_STATUS_SERVICE_UNAVAILABLE"></a> | 503 | Service Unavailable | | | |
| | `NNG_HTTP_STATUS_GATEWAY_TIMEOUT`<a name="NNG_HTTP_STATUS_GATEWAY_TIMEOUT"></a> | 504 | Gateway Timeout | | |
🧰 Tools
🪛 markdownlint-cli2 (0.23.1)
[warning] 178-178: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
[warning] 179-179: Table column count
Expected: 4; Actual: 3; Too few cells, row will be missing data
(MD056, table-column-count)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/ref/api/http.md` around lines 178 - 179, Update the rows for
NNG_HTTP_STATUS_SERVICE_UNAVAILABLE and NNG_HTTP_STATUS_GATEWAY_TIMEOUT to
include the table’s fourth Notes column, using an empty cell or an appropriate
note while preserving the existing status values and descriptions.
Source: Linters/SAST tools
| server configured for _client_, and creates an [`nng_http`] object for the connection. | ||
|
|
||
| This is done asynchronously, and when the operation succeseds the connection may be | ||
| This is done asynchronously, and when the operation succeeds the connection may be |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use retrieved, not retried.
nng_aio_get_output retrieves the connection from _aio; it does not retry the connection.
-the connection may be retried from the _aio_
+the connection may be retrieved from the _aio_🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/ref/api/http.md` at line 444, Update the documentation sentence near the
asynchronous operation description to use “retrieved” instead of “retried,”
accurately describing that nng_aio_get_output obtains the connection from _aio
rather than retrying it.
|
|
||
| > [!NOTE] | ||
| > Socket options are are used to tune the behavior of the higher level protocol. To change the options | ||
| > Socket options are used to tune the behavior of the higher level protocol. To change the options |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Hyphenate the compound modifier.
Use higher-level protocol in this sentence.
Proposed wording
-> Socket options are used to tune the behavior of the higher level protocol. To change the options
+> Socket options are used to tune the behavior of the higher-level protocol. To change the options📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| > Socket options are used to tune the behavior of the higher level protocol. To change the options | |
| > Socket options are used to tune the behavior of the higher-level protocol. To change the options |
🧰 Tools
🪛 LanguageTool
[grammar] ~306-~306: Use a hyphen to join words.
Context: ... used to tune the behavior of the higher level protocol. To change the options > ...
(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/ref/api/sock.md` at line 306, Update the sentence beginning “Socket
options are used” to hyphenate the compound modifier as “higher-level protocol,”
leaving the rest of the wording unchanged.
Source: Linters/SAST tools
This replaces #2279 - its just a the same content in a single squashed commit.
Summary by CodeRabbit