Skip to content

🧹 chore: Fix typos in code and docs#3507

Merged
ReneWerner87 merged 1 commit into
mainfrom
codex/2025-06-07-18-44-51
Jun 7, 2025
Merged

🧹 chore: Fix typos in code and docs#3507
ReneWerner87 merged 1 commit into
mainfrom
codex/2025-06-07-18-44-51

Conversation

@gaby
Copy link
Copy Markdown
Member

@gaby gaby commented Jun 7, 2025

Summary

  • fix various spelling mistakes in code and docs

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 7, 2025

Walkthrough

This update consists primarily of corrections to spelling, grammar, and naming consistency across code, tests, and documentation. Several error variable names and comments were fixed for clarity. A parameter in a generic function and related documentation was renamed for accuracy. No functional or control flow changes were introduced.

Changes

Files/Groups Change Summary
binder/binder.go, binder/mapping.go, binder/mapping_test.go, bind_test.go Renamed error variable and updated references from ErrMapNotConvertable to ErrMapNotConvertible.
helpers.go, docs/guide/utils.md Renamed parameter in Convert function from convertor to converter in code and documentation.
prefork.go Renamed variable from childs to children for clarity.
docs/api/bind.md, docs/middleware/encryptcookie.md, docs/whats_new.md Fixed spelling/grammar errors in documentation and comments.
listen.go Corrected "certficate" to "certificate" in struct field comments.
ctx.go, middleware/cors/cors.go, middleware/cors/cors_test.go, middleware/earlydata/earlydata_test.go, middleware/static/static_test.go, path.go, path_test.go Fixed various typos and improved comment clarity throughout code and tests.

Sequence Diagram(s)

No sequence diagrams generated as all changes are related to naming, comments, and documentation without affecting control flow or introducing new features.

Suggested labels

🧹 Updates

Suggested reviewers

  • sixcolors
  • ReneWerner87

Poem

In fields of code where rabbits hop,
We fix the words, we never stop.
From "convertor" to "converter" bright,
And "childs" to "children"—now it's right!
With every typo set to flight,
Our burrow's code shines pure and light.
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@gaby gaby added this to v3 Jun 7, 2025
@gaby gaby added this to the v3 milestone Jun 7, 2025
@gaby gaby added the v3 label Jun 7, 2025
@gaby gaby changed the title Fix typos 🧹 chore: Fix typos in code and docs Jun 7, 2025
@gaby gaby marked this pull request as ready for review June 7, 2025 18:46
Copilot AI review requested due to automatic review settings June 7, 2025 18:46
@gaby gaby requested a review from a team as a code owner June 7, 2025 18:46
@gaby gaby requested review from ReneWerner87, efectn and sixcolors June 7, 2025 18:46
@gaby gaby moved this to In Progress in v3 Jun 7, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 7, 2025

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 83.84%. Comparing base (f9eec85) to head (61b6875).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
helpers.go 0.00% 2 Missing ⚠️
binder/mapping.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3507   +/-   ##
=======================================
  Coverage   83.84%   83.84%           
=======================================
  Files         120      120           
  Lines       12278    12278           
=======================================
  Hits        10294    10294           
  Misses       1559     1559           
  Partials      425      425           
Flag Coverage Δ
unittests 83.84% <57.14%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

The PR addresses multiple spelling and typo corrections across code, comments, and documentation.

  • Renamed internal variables and error identifiers for correct English usage.
  • Fixed typos in comments, error messages, and documentation titles/signatures.
  • Updated signature parameter naming (convertorconverter) and error constant spelling.

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
prefork.go Renamed childs to children
path_test.go Corrected "charaters" → "characters" in comment
path.go Fixed "segement" → "segment" in comment
middleware/static/static_test.go Corrected "compressable" → "compressible"
middleware/earlydata/earlydata_test.go Fixed "unsuported" → "unsupported"
middleware/cors/cors_test.go Added apostrophe in "won't"
middleware/cors/cors.go Fixed "Ommit" → "Omit"
listen.go Corrected "certficate" → "certificate"
helpers.go Renamed convertorconverter
docs/whats_new.md Changed title to "What's New"
docs/middleware/encryptcookie.md Fixed "Intitializes" → "Initializes"
docs/guide/utils.md Renamed convertorconverter
docs/api/bind.md Fixed "therefor" → "therefore"
ctx.go Corrected "retured" → "returned"
binder/mapping_test.go Fixed ErrMapNotConvertableErrMapNotConvertible in test
binder/mapping.go Fixed return error ErrMapNotConvertableErrMapNotConvertible
binder/binder.go Renamed ErrMapNotConvertableErrMapNotConvertible
bind_test.go Updated test to use ErrMapNotConvertible
Comments suppressed due to low confidence (1)

docs/guide/utils.md:16

  • The documented signature shows a pointer return type *T but the actual Convert function returns (T, error). Update the docs signature to match the implementation.
func Convert[T any](value string, converter func(string) (T, error), defaultValue ...T) (*T, error)

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
docs/api/bind.md (1)

541-541: Refine punctuation around 'therefore' for clarity.

Add a semicolon or comma before and after 'therefore' to improve readability. For example:

- This function does NOT panic therefore you must still return on error explicitly
+ This function does NOT panic; therefore, you must still return on error explicitly
🧰 Tools
🪛 LanguageTool

[typographical] ~541-~541: The word “therefore” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...00 Bad Request`. This function does NOT panic therefore you must still return on error explicit...

(THUS_SENTENCE)

helpers.go (1)

745-746: Parameter rename aligned with docs; add unit tests for Convert.

Renamed convertor to converter, and updated its invocation. Please add unit tests to cover the new Convert function implementation.
Do you want me to generate a test suite for this function?

🧰 Tools
🪛 GitHub Check: codecov/patch

[warning] 745-746: helpers.go#L745-L746
Added lines #L745 - L746 were not covered by tests

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f9eec85 and 61b6875.

📒 Files selected for processing (18)
  • bind_test.go (1 hunks)
  • binder/binder.go (1 hunks)
  • binder/mapping.go (1 hunks)
  • binder/mapping_test.go (1 hunks)
  • ctx.go (1 hunks)
  • docs/api/bind.md (1 hunks)
  • docs/guide/utils.md (1 hunks)
  • docs/middleware/encryptcookie.md (1 hunks)
  • docs/whats_new.md (1 hunks)
  • helpers.go (1 hunks)
  • listen.go (1 hunks)
  • middleware/cors/cors.go (1 hunks)
  • middleware/cors/cors_test.go (1 hunks)
  • middleware/earlydata/earlydata_test.go (1 hunks)
  • middleware/static/static_test.go (5 hunks)
  • path.go (1 hunks)
  • path_test.go (1 hunks)
  • prefork.go (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (3)
binder/mapping.go (1)
binder/binder.go (1)
  • ErrMapNotConvertible (11-11)
binder/mapping_test.go (1)
binder/binder.go (1)
  • ErrMapNotConvertible (11-11)
bind_test.go (1)
binder/binder.go (1)
  • ErrMapNotConvertible (11-11)
🪛 GitHub Check: codecov/patch
binder/mapping.go

[warning] 116-116: binder/mapping.go#L116
Added line #L116 was not covered by tests

helpers.go

[warning] 745-746: helpers.go#L745-L746
Added lines #L745 - L746 were not covered by tests

🪛 LanguageTool
docs/api/bind.md

[typographical] ~541-~541: The word “therefore” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...00 Bad Request`. This function does NOT panic therefore you must still return on error explicit...

(THUS_SENTENCE)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Compare
  • GitHub Check: unit (1.24.x, windows-latest)
  • GitHub Check: repeated
🔇 Additional comments (24)
prefork.go (3)

79-81: Consistent renaming of map variable
Renamed the map from childs to the grammatically correct children. Declaration aligns with usage in subsequent code.


84-92: Updated references in deferred cleanup loop
Loop over children instead of the old childs identifier; logic for killing child processes remains unchanged.


118-122: Stored child process in children map
Assignment updated to use children[pid] = cmd. Verified no other references to the older variable name.

middleware/cors/cors.go (1)

141-141: Fix typo in comment: "Omit"
Corrects the spelling from "Ommit" to "Omit" in the simple request CORS handling comment; no behavior change.

path.go (1)

263-263: Fix typo in comment: "segment"
Updates the comment to correct "segement" to "segment" for clarity; functionality unaffected.

path_test.go (1)

61-61: Fix typo in test comment: "characters"
Corrects the spelling in the heavy test case comment; no logic changes.

docs/whats_new.md (1)

3-3: Add missing apostrophe in title
Updates the frontmatter title to "What's New in v3" to include the missing apostrophe.

docs/middleware/encryptcookie.md (1)

16-16: Fix typo in comment: "Initializes"
Corrects the spelling in the middleware signature comment to "Initializes".

ctx.go (1)

1756-1756: Typo fixed in comment.

Corrected “retured” to “returned” in the Subdomains method comment.

middleware/cors/cors_test.go (1)

860-860: Fixed contraction in comment.

Updated “wildcard wont set” to “wildcard won't set” for grammatical accuracy.

middleware/earlydata/earlydata_test.go (1)

52-52: Corrected spelling in error message.

Changed “unsuported” to “unsupported” in the early-data middleware test.

listen.go (3)

75-79: Typo fix in CertFile comment
Corrected “certficate” to “certificate” for the CertFile field, improving clarity and consistency.


81-85: Typo fix in CertKeyFile comment
Updated the comment to refer to the certificate’s private key correctly.


87-91: Typo fix in CertClientFile comment
Fixed “certficate” to “certificate” in the CertClientFile field description.

middleware/static/static_test.go (5)

743-743: Typo fix: non-compressible
Replaced “non-compressable” with the correct “non-compressible” spelling in the comment.


753-753: Typo fix: compressible
Updated “compressable” to the correct “compressible” in the comment.


775-775: Typo fix in Test_Static_Compress_WithoutEncoding
Corrected “compressable” to “compressible” in the test comment.


784-784: Typo fix: compressible context
Standardized the phrase “request compressible file with different encodings.”


830-830: Typo fix in Test_Static_Compress_WithFileSuffixes
Corrected comment to use “compressible” for consistency.

binder/mapping_test.go (1)

153-156: Consistent error naming in test
Updated assertion to use ErrMapNotConvertible matching the renamed error constant.

binder/mapping.go (2)

116-116: Consistent error constant usage
Replaced ErrMapNotConvertable with ErrMapNotConvertible in the slice branch.

🧰 Tools
🪛 GitHub Check: codecov/patch

[warning] 116-116: binder/mapping.go#L116
Added line #L116 was not covered by tests


123-123: Consistent error constant usage
Replaced ErrMapNotConvertable with ErrMapNotConvertible in the string/interface branch.

bind_test.go (1)

150-153: Consistent error naming in bind_test
Updated the map error assertion to use binder.ErrMapNotConvertible.

binder/binder.go (1)

11-11: Typo in error variable corrected.

Renamed ErrMapNotConvertable to ErrMapNotConvertible and updated the message to "map is not convertible". Consistency with other mapping error handling is maintained.

Comment thread docs/guide/utils.md
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.

Benchmark suite Current: 61b6875 Previous: f9eec85 Ratio
Benchmark_SlashRecognition/forEach 6.36 ns/op 0 B/op 0 allocs/op 3.707 ns/op 0 B/op 0 allocs/op 1.72
Benchmark_SlashRecognition/forEach - ns/op 6.36 ns/op 3.707 ns/op 1.72

This comment was automatically generated by workflow using github-action-benchmark.

@ReneWerner87 ReneWerner87 merged commit 80f4f99 into main Jun 7, 2025
13 of 15 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in v3 Jun 7, 2025
@gaby gaby deleted the codex/2025-06-07-18-44-51 branch June 7, 2025 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants