FFFF
Skip to content

Correct Documentation Typos - #2300

Merged
gdamore merged 1 commit into
mainfrom
gdamore/rebase-pr-2279-cleanly
Aug 2, 2026
Merged

Correct Documentation Typos#2300
gdamore merged 1 commit into
mainfrom
gdamore/rebase-pr-2279-cleanly

Conversation

@gdamore
@gdamore gdamore commented Aug 2, 2026
Copy link
Copy Markdown
Contributor

This replaces #2279 - its just a the same content in a single squashed commit.

Summary by CodeRabbit

  • Documentation
    • Corrected API reference declarations to accurately reflect supported parameter types, const usage, return values, and public type names.
    • Fixed message pipe accessor documentation and corrected the documented stopped-error value.
    • Improved accuracy of HTTP status references and API descriptions.
    • Fixed spelling, grammar, duplicated words, and other typographical errors across the documentation.

@coderabbitai
coderabbitai Bot commented Aug 2, 2026
Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The 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.

Changes

API documentation corrections

Layer / File(s) Summary
Public API signature corrections
docs/ref/api/aio.md, docs/ref/api/ctx.md, docs/ref/api/init.md, docs/ref/api/msg.md, docs/ref/api/sock.md, docs/ref/api/synch.md
Corrects public typedefs and function declarations, including const qualifiers, bool parameters, return types, pipe assignment, and mutex allocation.
Error and HTTP reference corrections
docs/ref/api/errors.md, docs/ref/api/http.md
Corrects error descriptions and the NNG_ESTOPPED value. Updates HTTP status labels, anchors, spelling, and duplicated words.
API prose corrections
docs/ref/api/ctx.md, docs/ref/api/logging.md, docs/ref/api/pipe.md, docs/ref/api/sock.md
Corrects spelling and duplicated words in API descriptions.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • nanomsg/nng#2279: Makes overlapping corrections to API declarations in the same documentation files.
  • nanomsg/nng#2291: Updates the nng_iov typedef in the same AIO API documentation.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the pull request, which corrects typos and inaccurate declarations in the API documentation.
Description check ✅ Passed The description identifies the replaced issue and explains that the changes match the prior pull request, but it omits the template agreement statement.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch gdamore/rebase-pr-2279-cleanly

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 43e9d59 and 64fb3bd.

📒 Files selected for processing (10)
  • docs/ref/api/aio.md
  • docs/ref/api/ctx.md
  • docs/ref/api/errors.md
  • docs/ref/api/http.md
  • docs/ref/api/init.md
  • docs/ref/api/logging.md
  • docs/ref/api/msg.md
  • docs/ref/api/pipe.md
  • docs/ref/api/sock.md
  • docs/ref/api/synch.md

Comment thread docs/ref/api/http.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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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.

Suggested change
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

Comment thread docs/ref/api/http.md
Comment on lines +178 to +179
| `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 |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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.

Suggested change
| `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

Comment thread docs/ref/api/http.md
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 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.

Comment thread docs/ref/api/sock.md

> [!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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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.

Suggested change
> 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

@gdamore
gdamore merged commit 7a606cf into main Aug 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0