Skip to content

🧹 chore: Fix spelling issues#3813

Merged
ReneWerner87 merged 35 commits intogofiber:mainfrom
jsoref:spelling
Oct 22, 2025
Merged

🧹 chore: Fix spelling issues#3813
ReneWerner87 merged 35 commits intogofiber:mainfrom
jsoref:spelling

Conversation

@jsoref
Copy link
Contributor

@jsoref jsoref commented Oct 21, 2025

Description

Fix items identified in https://github.com/jsoref/fiber/actions/runs/18697395941/attempts/1#summary-53318269839 (verified in https://github.com/jsoref/fiber/actions/runs/18697396150/attempts/1#summary-53318270369)

Changes introduced

List the new features or adjustments introduced in this pull request. Provide details on benchmarks, documentation updates, changelog entries, and if applicable, the migration guide.

  • Benchmarks: Describe any performance benchmarks and improvements related to the changes.
  • Documentation Update: Detail the updates made to the documentation and links to the changed files.
  • Changelog/What's New: Include a summary of the additions for the upcoming release notes.
  • Migration Guide: If necessary, provide a guide or steps for users to migrate their existing code to accommodate these changes.
  • API Alignment with Express: Explain how the changes align with the Express API.
  • API Longevity: Discuss the steps taken to ensure that the new or updated APIs are consistent and not prone to breaking changes.
  • Examples: Provide examples demonstrating the new features or changes in action.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Enhancement (improvement to existing features and functionality)
  • Documentation update (changes to documentation)
  • Performance improvement (non-breaking change which improves efficiency)
  • Code consistency (non-breaking change which improves code reliability and robustness)

Checklist

Before you submit your pull request, please make sure you meet these requirements:

  • Followed the inspiration of the Express.js framework for new functionalities, making them similar in usage.
  • Conducted a self-review of the code and provided comments for complex or critical parts.
  • Updated the documentation in the /docs/ directory for Fiber's documentation.
  • Added or updated unit tests to validate the effectiveness of the changes or new features.
  • Ensured that new and existing unit tests pass locally with the changes.
  • Verified that any new dependencies are essential and have been agreed upon by the maintainers/community.
  • Aimed for optimal performance with minimal allocations in the new code.
  • Provided benchmarks for the new code to analyze and improve upon.

Commit formatting

Please use emojis in commit messages for an easy way to identify the purpose or intention of a commit. Check out the emoji cheatsheet here: CONTRIBUTING.md

  • I'm skipping this for now. I'll squash once people decide which changes they want.

jsoref added 30 commits October 21, 2025 13:34
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
@jsoref jsoref requested a review from a team as a code owner October 21, 2025 20:59
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 21, 2025

Walkthrough

Standardizes comments and docs (capitalization, punctuation, wording), fixes multiple test string typos and test names, renames an internal variable, and adds one new public method OriginalURL() to the Req interface. No runtime behavior changes.

Changes

Cohort / File(s) Summary
Branding / header fixes
AGENTS.md, color.go, ctx.go, ctx_interface.go, ctx_test.go, group.go, helpers.go, helpers_test.go, listen.go, mount.go, mount_test.go, path.go, path_test.go, prefork_test.go, redirect.go, redirect_test.go, register.go, router.go
Updated header/comment references from "Github" → "GitHub" and similar branding capitalization fixes.
Punctuation & grammar edits
app.go, app_test.go, bind.go, docs/api/app.md, docs/api/ctx.md, req.go, res.go, res_interface_gen.go, ctx_interface_gen.go, docs/api/services.md, docs/api/state.md, docs/extra/internal.md, docs/guide/extractors.md, docs/middleware/csrf.md, docs/whats_new.md, middleware/*/*, middleware/session/*, middleware/static/*, middleware/cache/*, middleware/earlydata/config.go, middleware/limiter/limiter_sliding.go, middleware/logger/*, middleware/proxy/proxy.go
Minor editorial edits: commas/semicolons, wording fixes, hyphenation and phrasing standardization. No code or behavior changes.
Test data and expected value corrections
bind_test.go, client/hooks_test.go, client/client_test.go, path_testcases_test.go, middleware/session/data_test.go, middleware/session/store_test.go, middleware/static/static_test.go, middleware/cache/cache_test.go, middleware/idempotency/locker_test.go, state_test.go, hooks_test.go, bind_test.go
Corrected test literals and labels (e.g., scoccersoccer, criclecircle, non-existentnonexistent, /partiaFoo/partialFoo), and adjusted test names/expectations.
Test function & field renames
hooks_test.go, router_test.go
Renamed test function Test_Hook_OnPrehutdownTest_Hook_OnPreShutdown; renamed test/public test fixture field GithubAPIGitHubAPI and updated benchmark name(s).
Internal rename
middleware/cors/cors.go
Renamed internal slice allowSOriginsallowSubOrigins and updated its references. No API change.
New public API method
req_interface_gen.go
Added OriginalURL() string to the public Req interface.
Other small comment/test adjustments
(various)
Numerous small comment fixes, capitalization, and wording standardizations across docs and tests; no behavioral changes beyond cohorts above.

Sequence Diagram(s)

(Skipped) — changes are editorial, test-data fixes, an internal rename, and a single small interface addition; there is no new runtime control flow warranting a sequence diagram.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Rationale: Mostly repetitive documentation/test fixes (low per-file complexity) but includes an interface addition and an internal variable rename plus several test-name changes that require validating public API compatibility and test updates.

Possibly related PRs

Suggested labels

📒 Documentation

Suggested reviewers

  • ReneWerner87
  • efectn

Poem

🐰
I hopped through docs to mend each line,
commas neat and GitHub spelled fine.
Tests now cheer with soccer's run,
a new OriginalURL — hop, done! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description is largely incomplete. The description section contains only two lines with links to external CI runs, providing no clear explanation of what problems are being addressed, what the changes accomplish, or their benefits to the project. None of the checklist items under "Changes introduced", "Type of change", or the main "Checklist" are filled out or marked as complete. While the author added a note about deferring commit formatting for a later squash, the description template's core requirements for explaining the purpose and scope of changes have not been adequately addressed. A developer reviewing this PR would need to follow the external links to understand the actual content of the fixes. Expand the description section to provide a clear, concise explanation of what spelling and formatting issues were fixed and why these changes are beneficial. Select the appropriate "Type of change" option (likely "Code consistency" based on the changeset). Complete relevant items in the "Changes introduced" section, or explicitly indicate which sections are not applicable. This will help reviewers understand the scope and rationale for the changes without requiring them to access external links.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Fix spelling issues" is partially related to the changeset. While spelling corrections are indeed present throughout the changes (e.g., "scoccer" to "soccer", "cricle" to "circle"), the pull request encompasses a broader scope of textual improvements. The raw summary reveals that the changes also include grammar fixes ("binded" to "bound", "there're" to "there is"), capitalization corrections ("Github" to "GitHub"), punctuation adjustments (commas and semicolons), and wording changes ("fallback" to "fall back", "case insensitive" to "case-insensitive"). The title accurately captures one significant aspect of the changes but understates the full scope of textual and formatting fixes being applied.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb5c28e and 4a5290b.

📒 Files selected for processing (3)
  • docs/api/app.md (1 hunks)
  • docs/whats_new.md (1 hunks)
  • path.go (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • docs/api/app.md
  • docs/whats_new.md
  • path.go
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Compare
  • GitHub Check: unit (1.25.x, macos-13)
  • GitHub Check: repeated
  • GitHub Check: unit (1.25.x, macos-latest)
  • GitHub Check: unit (1.25.x, windows-latest)
  • GitHub Check: lint

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 and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jsoref, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a wide array of textual inconsistencies and errors across the project's source code, documentation, and test suites. The primary goal is to enhance the overall quality, clarity, and professionalism of the written content, making it easier for developers and users to understand the codebase and its functionalities. These changes, while minor individually, collectively contribute to a more polished and reliable project.

Highlights

  • Spelling and Grammar Corrections: Numerous spelling and grammatical errors have been corrected across various files, including comments, documentation, and test descriptions. Examples include 'Github' to 'GitHub', 'scoccer' to 'soccer', 'cricle' to 'circle', 'non-existent' to 'nonexistent', and 'pre-populate' to 'prepopulate'.
  • Punctuation and Phrasing Improvements: Punctuation has been refined for better readability, such as changing 'otherwise it returns' to 'otherwise, it returns' and 'in case when your app is behind the proxy' to 'if your app is behind a proxy'. Phrasing like 'an fiber.Handler' was corrected to 'a fiber.Handler'.
  • Consistent Terminology: Terms like 'case insensitive' have been standardized to 'case-insensitive' for consistency. Variable names like 'allowSOrigins' were updated to 'allowSubOrigins' for clarity.
  • Documentation Clarity: Documentation files (docs/api/app.md, docs/api/ctx.md, docs/api/services.md, docs/api/state.md, docs/extra/internal.md, docs/guide/extractors.md, docs/middleware/csrf.md, docs/whats_new.md) have received updates to improve the precision and flow of explanations.
  • Test Code Refinements: Test file comments and descriptions (app_test.go, bind_test.go, client/client_test.go, client/hooks_test.go, ctx_test.go, helpers_test.go, hooks_test.go, middleware/cache/cache_test.go, middleware/idempotency/locker_test.go, middleware/keyauth/keyauth_test.go, middleware/csrf/csrf_test.go, middleware/session/data_test.go, middleware/session/store_test.go, middleware/static/static_test.go, mount_test.go, path_testcases_test.go, prefork_test.go, redirect_test.go, router_test.go, state_test.go) have been corrected for accuracy and better understanding of test cases.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
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: 0

🧹 Nitpick comments (1)
middleware/cache/cache_test.go (1)

536-537: Nit: fix grammar in test comment.

Tidy up capitalization and preposition.

-				// SomeTimes,The id is not equal with a
+				// Sometimes, the id is not equal to a
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 40a8c2c and 7e70ca2.

📒 Files selected for processing (59)
  • AGENTS.md (1 hunks)
  • app.go (5 hunks)
  • app_test.go (3 hunks)
  • bind.go (2 hunks)
  • bind_test.go (2 hunks)
  • client/client_test.go (1 hunks)
  • client/hooks_test.go (2 hunks)
  • color.go (1 hunks)
  • ctx.go (1 hunks)
  • ctx_interface.go (1 hunks)
  • ctx_interface_gen.go (4 hunks)
  • ctx_test.go (4 hunks)
  • docs/api/app.md (1 hunks)
  • docs/api/ctx.md (1 hunks)
  • docs/api/services.md (1 hunks)
  • docs/api/state.md (1 hunks)
  • docs/extra/internal.md (1 hunks)
  • docs/guide/extractors.md (1 hunks)
  • docs/middleware/csrf.md (1 hunks)
  • docs/whats_new.md (1 hunks)
  • group.go (1 hunks)
  • helpers.go (2 hunks)
  • helpers_test.go (2 hunks)
  • hooks_test.go (1 hunks)
  • listen.go (1 hunks)
  • middleware/cache/cache_test.go (1 hunks)
  • middleware/cache/config.go (1 hunks)
  • middleware/cors/cors.go (3 hunks)
  • middleware/csrf/csrf_test.go (2 hunks)
  • middleware/earlydata/config.go (1 hunks)
  • middleware/idempotency/locker_test.go (1 hunks)
  • middleware/keyauth/keyauth_test.go (2 hunks)
  • middleware/limiter/limiter_sliding.go (2 hunks)
  • middleware/logger/config.go (1 hunks)
  • middleware/logger/logger.go (1 hunks)
  • middleware/proxy/proxy.go (3 hunks)
  • middleware/session/data_test.go (2 hunks)
  • middleware/session/middleware.go (2 hunks)
  • middleware/session/session.go (2 hunks)
  • middleware/session/store.go (1 hunks)
  • middleware/session/store_test.go (1 hunks)
  • middleware/static/static.go (1 hunks)
  • middleware/static/static_test.go (1 hunks)
  • mount.go (1 hunks)
  • mount_test.go (2 hunks)
  • path.go (2 hunks)
  • path_test.go (1 hunks)
  • path_testcases_test.go (3 hunks)
  • prefork_test.go (1 hunks)
  • redirect.go (2 hunks)
  • redirect_test.go (1 hunks)
  • register.go (1 hunks)
  • req.go (8 hunks)
  • req_interface_gen.go (3 hunks)
  • res.go (1 hunks)
  • res_interface_gen.go (1 hunks)
  • router.go (1 hunks)
  • router_test.go (4 hunks)
  • state_test.go (23 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
docs/**

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Review and update the contents of the docs folder if necessary when modifying code

Files:

  • docs/extra/internal.md
  • docs/middleware/csrf.md
  • docs/guide/extractors.md
  • docs/api/state.md
  • docs/api/services.md
  • docs/whats_new.md
  • docs/api/ctx.md
  • docs/api/app.md
**/*.go

📄 CodeRabbit inference engine (AGENTS.md)

**/*.go: Format Go code using gofumpt (Make target: make format).
Run golangci-lint for linting (Make target: make lint).
Run go vet as part of audit to catch suspicious constructs (Make target: make audit).
Optimize struct field alignment with betteralign (Make target: make betteralign).
Apply gopls modernize to update code patterns (Make target: make modernize).

Files:

  • middleware/keyauth/keyauth_test.go
  • listen.go
  • middleware/cors/cors.go
  • middleware/idempotency/locker_test.go
  • res_interface_gen.go
  • middleware/session/data_test.go
  • middleware/csrf/csrf_test.go
  • ctx_interface_gen.go
  • prefork_test.go
  • path.go
  • middleware/limiter/limiter_sliding.go
  • path_test.go
  • ctx.go
  • client/hooks_test.go
  • req_interface_gen.go
  • client/client_test.go
  • res.go
  • register.go
  • mount_test.go
  • group.go
  • middleware/earlydata/config.go
  • middleware/cache/config.go
  • middleware/logger/logger.go
  • middleware/cache/cache_test.go
  • hooks_test.go
  • req.go
  • app.go
  • middleware/proxy/proxy.go
  • color.go
  • bind.go
  • middleware/session/session.go
  • router_test.go
  • redirect.go
  • helpers.go
  • helpers_test.go
  • middleware/static/static.go
  • redirect_test.go
  • ctx_test.go
  • middleware/session/store_test.go
  • middleware/session/middleware.go
  • ctx_interface.go
  • path_testcases_test.go
  • mount.go
  • middleware/session/store.go
  • bind_test.go
  • middleware/logger/config.go
  • state_test.go
  • app_test.go
  • middleware/static/static_test.go
  • router.go
**/*_test.go

📄 CodeRabbit inference engine (AGENTS.md)

**/*_test.go: Run the test suite with gotestsum (Make target: make test).
Run benchmarks with go test (Make target: make benchmark).

Files:

  • middleware/keyauth/keyauth_test.go
  • middleware/idempotency/locker_test.go
  • middleware/session/data_test.go
  • middleware/csrf/csrf_test.go
  • prefork_test.go
  • path_test.go
  • client/hooks_test.go
  • client/client_test.go
  • mount_test.go
  • middleware/cache/cache_test.go
  • hooks_test.go
  • router_test.go
  • helpers_test.go
  • redirect_test.go
  • ctx_test.go
  • middleware/session/store_test.go
  • path_testcases_test.go
  • bind_test.go
  • state_test.go
  • app_test.go
  • middleware/static/static_test.go
🧠 Learnings (4)
📚 Learning: 2024-11-10T23:44:13.704Z
Learnt from: gaby
PR: gofiber/fiber#3193
File: middleware/adaptor/adaptor.go:111-111
Timestamp: 2024-11-10T23:44:13.704Z
Learning: In the `middleware/adaptor/adaptor.go` file of the Fiber framework, when updating context handling, replacing `c.Context()` with `c.RequestCtx()` is appropriate to access the `fasthttp.RequestCtx`.

Applied to files:

  • middleware/csrf/csrf_test.go
📚 Learning: 2025-10-16T07:15:26.529Z
Learnt from: grivera64
PR: gofiber/fiber#3807
File: adapter_test.go:118-144
Timestamp: 2025-10-16T07:15:26.529Z
Learning: In Fiber v3, net/http handlers (http.Handler, http.HandlerFunc, or raw func(http.ResponseWriter, *http.Request)) can be passed directly to routing methods like app.Get(), app.Post(), etc. The framework automatically detects and wraps them internally via toFiberHandler/collectHandlers. The github.com/gofiber/fiber/v3/middleware/adaptor package is legacy and should not be suggested for tests or code using native net/http handler support.

Applied to files:

  • prefork_test.go
  • path.go
  • app.go
  • router_test.go
📚 Learning: 2025-10-13T09:33:51.748Z
Learnt from: CR
PR: gofiber/fiber#0
File: AGENTS.md:0-0
Timestamp: 2025-10-13T09:33:51.748Z
Learning: Before running the startup script, check for a vendor/ directory or that `go list -m -mod=readonly all` succeeds; if either is true, skip all startup steps (go mod and go install). Otherwise, run the listed startup commands.

Applied to files:

  • AGENTS.md
📚 Learning: 2025-10-16T07:19:52.418Z
Learnt from: grivera64
PR: gofiber/fiber#3807
File: adapter_test.go:118-144
Timestamp: 2025-10-16T07:19:52.418Z
Learning: In the Fiber codebase, the linter does not allow `require` assertions from within HTTP handlers (including net/http-style handlers). Use `t.Fatalf`, `t.Errorf`, or similar `testing.T` methods for error handling inside handler functions instead.

Applied to files:

  • app_test.go
🧬 Code graph analysis (1)
hooks_test.go (1)
hooks.go (1)
  • Hooks (29-43)
🔇 Additional comments (79)
docs/middleware/csrf.md (1)

303-303: Correct grammar in comment: "fallback" → "fall back".

The change properly distinguishes between the noun "fallback" and the verb phrase "fall back." In this context, "fall back to form" correctly uses the verb phrase.

docs/api/state.md (1)

467-467: Good documentation refinement.

Removing the redundant "default" from the comment improves clarity and conciseness. Since the function name already includes WithDefault, the simplified wording "Retrieve a value with a fallback" is more effective.

middleware/logger/logger.go (1)

78-78: LGTM!

Typo corrected: "longested" → "longest". The comment now accurately describes the loop that computes the longest route path for error padding.

middleware/cache/config.go (1)

53-56: Grammar fix is correct.

The article correction from "an cached" to "a cached" is grammatically sound. This is a documentation-only change with no functional impact.

middleware/earlydata/config.go (1)

29-29: Documentation improvement: clearer conditional phrasing.

The change from "in case" to "if" improves grammatical clarity and directness in the comment, aligning with the PR's standardization objective.

middleware/keyauth/keyauth_test.go (3)

199-199: Documentation improvement approved.

Comment capitalization and clarity enhancement; no functional changes.


259-259: Documentation improvement approved.

Comment capitalization and clarity enhancement; no functional changes.


262-262: Documentation improvement approved.

Comment capitalization and clarity enhancement; no functional changes.

middleware/static/static_test.go (1)

1100-1100: Spelling correction approved.

The comment wording update from "non-existent" to "nonexistent" is appropriate. This aligns with the PR's spelling standardization goals and requires no functional changes to the test logic.

middleware/idempotency/locker_test.go (1)

117-117: LGTM! Spelling correction improves documentation clarity.

The spelling correction from "repreated" to "repeated" is accurate and enhances the readability of the comment.

middleware/limiter/limiter_sliding.go (2)

67-69: Comment clarity improvement: consistent terminology.

The wording change on line 68 improves the comment clarity by using consistent terminology ("expiry" aligns with variable naming and prior context). The comment now better explains the timing logic for when the entry resets.


100-104: Comment clarity improvement: better transition phrase.

The change from line 103 ("Otherwise" instead of a different phrasing) improves the logical flow of the comment explaining the garbage collection strategy. The revised wording makes the relationship between the window timing and attack prevention more explicit and easier to follow.

client/client_test.go (1)

1341-1341: LGTM! Proper hyphenation of compound adjective.

The addition of the hyphen in "case-insensitive" is grammatically correct and improves consistency with standard English usage.

middleware/static/static.go (1)

82-82: LGTM! Documentation punctuation improved.

The semicolon correctly joins two independent clauses, and the comma after "otherwise" improves readability.

docs/guide/extractors.md (1)

204-204: Correct grammar fix: verb phrase "fall back to" vs. noun "fallback".

The change from "fallback to" to "fall back to" in the comment is grammatically correct. The phrase is used as a verb (the action of falling back), whereas other instances in the document like "public fallback" (line 208) correctly use "fallback" as a noun. The documentation maintains consistent and clear language throughout.

middleware/csrf/csrf_test.go (2)

1766-1766: LGTM! Clear and grammatically correct comment.

The comment accurately describes the chain extractor behavior and uses the correct verb form "fall back" (two words).


2152-2152: LGTM! Helpful inline comment.

The comment clarifies the purpose of the function call, improving code readability without affecting functionality.

path_testcases_test.go (2)

2-2: LGTM! Correct capitalization of GitHub.

The update to "GitHub Repository" follows proper branding and capitalization standards.


353-353: LGTM! Typo corrected in test data.

The URL is corrected from "/partiaFoo" to "/partialFoo", improving test data clarity and consistency.

middleware/cors/cors.go (1)

47-47: Rename verified as complete and correct.

The variable rename from allowSOriginsallowSubOrigins is consistently applied across all three locations (lines 47, 66, 135) with no remnants of the old name in the codebase. The change improves clarity by making the variable purpose immediately obvious (subdomain origins).

middleware/session/store.go (1)

269-269: LGTM! Documentation punctuation improved.

The semicolon correctly separates the contrasting clauses, improving readability and following standard punctuation guidelines.

middleware/session/session.go (2)

105-105: LGTM! Documentation clarified.

Explicitly stating both boolean return cases improves API documentation clarity.


565-565: LGTM! Consistent punctuation applied.

The semicolon and comma usage now matches the Fresh() documentation style, improving consistency across the file.

middleware/session/store_test.go (1)

179-181: LGTM! Test naming standardized.

The change to "nonexistent" (single word, no hyphen) aligns with standard English spelling and improves consistency across the test suite.

middleware/session/data_test.go (1)

143-150: LGTM! Comprehensive terminology standardization.

All instances of "non-existent" have been consistently updated to "nonexistent" throughout the test cases, improving consistency with the changes in store_test.go and aligning with standard spelling conventions.

Also applies to: 195-201

register.go (1)

2-2: LGTM: GitHub capitalization standardized.

The correction from "Github" to "GitHub" properly standardizes the brand name capitalization across the codebase.

ctx.go (1)

2-2: LGTM: GitHub capitalization corrected.

Consistent with the standardization applied across other files.

group.go (1)

2-2: LGTM: GitHub capitalization standardized.

redirect_test.go (1)

2-2: LGTM: GitHub capitalization corrected.

path_test.go (1)

2-2: LGTM: GitHub capitalization standardized.

listen.go (1)

2-2: LGTM: GitHub capitalization corrected.

ctx_interface.go (1)

2-2: LGTM: GitHub capitalization standardized.

docs/extra/internal.md (1)

268-268: LGTM: Grammar corrected.

Properly uses "fall back" (verb phrase) instead of "fallback" (noun) to describe the action.

redirect.go (1)

2-2: LGTM! Documentation improvements.

The changes correctly standardize "GitHub" capitalization and fix the grammatical error in the possessive form ("its'" → "its").

Also applies to: 88-88

docs/api/ctx.md (1)

799-799: LGTM! Improved punctuation.

The revised punctuation better separates independent clauses and improves readability.

mount.go (1)

2-2: LGTM! Standardized GitHub capitalization.

prefork_test.go (1)

2-2: LGTM! Standardized GitHub capitalization.

helpers.go (1)

2-2: LGTM! Documentation improvements.

Standardizes GitHub capitalization and correctly hyphenates the compound adjective "case-insensitive."

Also applies to: 311-311

res_interface_gen.go (1)

147-147: LGTM! Improved punctuation.

The comma after "otherwise" improves readability. Note that this is generated code (line 1: "Code generated by ifacemaker"); ensure the source template is also updated so this change persists after regeneration.

middleware/logger/config.go (1)

39-39: LGTM! Fixed grammatical error.

Correctly removed the duplicate "the" from the comment.

middleware/proxy/proxy.go (1)

126-126: LGTM! Fixed article usage.

Correctly changed "an fiber.Handler" to "a fiber.Handler" in all three method comments (Forward, DomainForward, BalancerForward).

Also applies to: 213-213, 246-246

color.go (1)

2-2: LGTM! GitHub capitalization corrected.

The header comment now uses the proper "GitHub" capitalization, aligning with the brand standard.

bind.go (2)

154-154: LGTM! Grammar correction.

Changed "binded" to "bound" (the correct past participle of "bind").


302-302: LGTM! Grammar improvement.

Changed "there're" to "there is" for better clarity and formality.

docs/api/services.md (1)

13-13: LGTM! Minor grammar refinement.

Removed "the" for more concise phrasing.

docs/whats_new.md (1)

1158-1158: LGTM! Documentation enhancement.

Added proper link and full name label for the Web Incubator Community Group (WICG), improving reference clarity.

router.go (1)

2-2: LGTM! GitHub capitalization corrected.

Consistent with the project-wide update to use proper "GitHub" branding.

docs/api/app.md (2)

14-14: LGTM! Punctuation improvement.

Added comma after "Otherwise" for correct grammar and better readability.


22-22: LGTM! Punctuation improvement.

Added comma after "Otherwise" for correct grammar and better readability.

hooks_test.go (1)

181-196: LGTM! Test name and data corrected.

Fixed typo in test function name ("OnPrehutdown" → "OnPreShutdown") and updated test data to match the proper hook name. This aligns with the actual OnPreShutdown hook defined in hooks.go.

app_test.go (2)

2-2: LGTM! GitHub capitalization corrected.

Consistent with the project-wide branding update.


533-547: LGTM! Grammar correction.

Fixed article from "an" to "a" before "custom error" (correct English grammar).

state_test.go (1)

746-746: LGTM! Comment standardization is correct.

The hyphen removal from "pre-populate" to "prepopulate" standardizes the terminology across all benchmark setup comments. No functional changes.

Also applies to: 765-765, 784-784, 803-803, 822-822, 841-841, 860-860, 879-879, 898-898, 917-917, 984-984, 1001-1001, 1018-1018, 1035-1035, 1052-1052, 1069-1069, 1086-1086, 1103-1103, 1120-1120, 1137-1137, 1154-1154, 1171-1171, 1189-1189

AGENTS.md (1)

5-5: LGTM! Documentation formatting improvement.

The change from "->" to ">" uses standard Markdown blockquote syntax, and the comma after "Otherwise" improves readability. The instruction remains semantically identical.

ctx_interface_gen.go (3)

217-217: LGTM! Documentation grammar improvements.

Changing "behind the proxy" to "behind a proxy" provides better grammatical consistency across the proxy-related method documentation.

Also applies to: 223-223, 229-229, 266-266


257-257: LGTM! Punctuation improvement.

Adding a comma after "given a key" improves readability of the MultipartForm documentation.


412-412: LGTM! Punctuation standardization.

The semicolon usage in the Vary method comment matches the punctuation style used elsewhere in the codebase (e.g., res.go line 950).

helpers_test.go (2)

2-2: LGTM! Correct brand name capitalization.

"GitHub" is the proper capitalization of the repository host's name.


225-225: LGTM! Correct hyphenation.

"case-insensitive" is the correct hyphenation for this compound adjective when used attributively.

path.go (3)

2-2: LGTM! Correct brand name capitalization.

"GitHub" is the proper capitalization of the repository host's name.


262-262: LGTM! Grammar improvement.

"loop from beginning to end" is more grammatically correct than "loop from begin to end."


266-267: LGTM! Comment clarity improvement.

The updated comment more clearly explains the condition being checked (when neither parameter is greedy and they're adjacent).

res.go (1)

950-950: LGTM! Punctuation standardization.

The semicolon provides better separation between the two independent clauses, improving readability. This matches the parallel change in the interface definition.

mount_test.go (2)

2-2: LGTM! Correct brand name capitalization.

"GitHub" is the proper capitalization of the repository host's name.


170-170: LGTM! Improved comment clarity.

Using "when" instead of "in case" makes the comment more direct and easier to understand.

bind_test.go (1)

75-75: LGTM! Test data typo correction.

Correcting "scoccer" to "soccer" in test input strings improves test data quality. The test logic remains unchanged - it still validates parsing of hobby parameters in various formats.

Also applies to: 151-151, 156-156

router_test.go (4)

2-2: LGTM! GitHub URL capitalization corrected.

The repository URL documentation now properly capitalizes "GitHub" in the URL comment.


1207-1207: Consistent field access update.

The field reference correctly uses the renamed GitHubAPI field.


1592-1593: Benchmark function renamed for consistency.

The benchmark name now properly capitalizes "GitHub" in its identifier, aligning with Go naming conventions and brand standards.


1628-1628: Note: Public field rename is a breaking change.

The struct field GithubAPI has been renamed to GitHubAPI, which is a breaking change for any external code that directly accesses this exported field. The JSON tag remains github_api, so JSON unmarshaling is unaffected. This change aligns with proper capitalization standards for the GitHub brand.

req.go (8)

320-320: LGTM! Grammar improvement in documentation.

Changed "behind the proxy" to "behind a proxy" for more idiomatic English.


338-338: LGTM! Consistent grammar improvement.

Documentation updated to use "behind a proxy" for consistency with other comments.


356-356: LGTM! Documentation consistency maintained.

Comment updated to match the improved phrasing used elsewhere in the file.


415-415: LGTM! Clearer validation logic description.

The reworded comment better explains the conditional validation logic flow.


563-563: LGTM! Documentation clarity improved.

The comment now more clearly describes the map structure returned by MultipartForm.


593-593: LGTM! Helpful clarification added.

The inline comment clarifies the condition being checked.


628-628: LGTM! Grammar consistency maintained.

Documentation updated to use "behind a proxy" consistent with other method comments.


720-720: LGTM! Parameter documentation refined.

The description of the defaultValue parameter has been clarified.

middleware/cache/cache_test.go (1)

1075-1078: Comment clarity improved; no behavior impact.

Wording around stableAscendingExpiration() reads better and accurately describes the intent. No code changes, tests remain unaffected.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a comprehensive set of spelling and grammar corrections throughout the codebase. The changes span across documentation, code comments, and even test assertions, improving the overall readability and professionalism of the project. I've reviewed the modifications, and they are all accurate and beneficial. There are no outstanding issues, and the pull request is ready for merging.

#### New Struct Fields

- `Config.AllowPrivateNetwork`: This new field is a boolean that allows you to control whether private networks are allowed. This is related to the [Private Network Access (PNA)](https://wicg.github.io/private-network-access/) specification from the Web Incubator Community Group (WICG). When set to `true`, the CORS middleware will allow CORS preflight requests from private networks and respond with the `Access-Control-Allow-Private-Network: true` header. This could be useful in development environments or specific use cases, but should be done with caution due to potential security risks.
- `Config.AllowPrivateNetwork`: This new field is a boolean that allows you to control whether private networks are allowed. This is related to the [Private Network Access (PNA)](https://wicg.github.io/private-network-access/) specification from the [Web Incubator Community Group (WICG)](https://wicg.io/). When set to `true`, the CORS middleware will allow CORS preflight requests from private networks and respond with the `Access-Control-Allow-Private-Network: true` header. This could be useful in development environments or specific use cases, but should be done with caution due to potential security risks.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fwiw, this wasn't a rule, it was an in-the-neighborhood fix.

{url: "/partialCheck/foo/bar/test/test2", params: []string{"test"}, match: true, partialCheck: true},
{url: "/partialCheck/foo/bar", params: nil, match: false, partialCheck: true},
{url: "/partiaFoo", params: nil, match: false, partialCheck: true},
{url: "/partialFoo", params: nil, match: false, partialCheck: true},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's hard to tell what a test like this is trying to achieve. Maybe it really needs to not have that l? If so, I think a comment would be warranted.

@jsoref
Copy link
Contributor Author

jsoref commented Oct 21, 2025

#3813 (review)

AGENTS.md (1)
5-5: LGTM! Documentation formatting improvement.

The change from "->" to ">" uses standard Markdown blockquote syntax, and the comma after "Otherwise" improves readability. The instruction remains semantically identical.

@coderabbitai this feels like a bug. I didn't touch an arrow. It seems likely that the tool parsed the diff line prefix (-) with the markdown quote (>) as an arrow (->) and then compared it to the > from the replacement -- properly ignoring the line prefix (+).

@@ -2,7 +2,7 @@
 
 ## Agent Instructions
 
-> **Note for the AI agent:** Before running the startup script, verify that all dependencies and CLI tools are already available. If a `vendor/` directory exists **or** `go list -m -mod=readonly all` succeeds (indicating modules are cached), you may skip the entire startup script—including all `go mod` commands and `go install` steps. Otherwise run the script as listed below.
+> **Note for the AI agent:** Before running the startup script, verify that all dependencies and CLI tools are already available. If a `vendor/` directory exists **or** `go list -m -mod=readonly all` succeeds (indicating modules are cached), you may skip the entire startup script—including all `go mod` commands and `go install` steps. Otherwise, run the script as listed below.
 
 ---

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 21, 2025

Tip

For best results, initiate chat on the files or code changes.

@jsoref You're absolutely correct, and I apologize for the error in my review comment!

Looking at the actual diff you provided, the only change to AGENTS.md is the addition of a comma after "Otherwise":

Before: Otherwise run the script as listed below.
After: Otherwise, run the script as listed below.

There was no arrow change at all. The line starts with > (markdown blockquote syntax) in both versions. It appears the diff line prefix (-) was incorrectly combined with the markdown blockquote character (>) and mistakenly interpreted as an arrow (->), which then seemed to "change" to just > in the replacement line.

This is indeed a parsing bug. Thank you for catching this and providing such a clear explanation of what likely went wrong! The actual change—adding the comma for better grammatical clarity—is perfectly fine.

🐰

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
@gaby gaby changed the title Spelling 🧹 chore: Fix spelling issues Oct 21, 2025
@gaby gaby added this to v3 Oct 21, 2025
@gaby gaby added this to the v3 milestone Oct 21, 2025
Copy link
Member

@gaby gaby left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.90%. Comparing base (b00805c) to head (4a5290b).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
middleware/limiter/limiter_sliding.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3813   +/-   ##
=======================================
  Coverage   91.90%   91.90%           
=======================================
  Files         115      115           
  Lines       12353    12353           
=======================================
  Hits        11353    11353           
- Misses        729      730    +1     
+ Partials      271      270    -1     
Flag Coverage Δ
unittests 91.90% <90.00%> (ø)

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.

sixcolors

This comment was marked as outdated.

@ReneWerner87 ReneWerner87 merged commit 534aa88 into gofiber:main Oct 22, 2025
14 of 15 checks passed
@github-project-automation github-project-automation bot moved this to Done in v3 Oct 22, 2025
@jsoref jsoref deleted the spelling branch October 22, 2025 15:26
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.

4 participants