Skip to content

Conversation

@linkmauve
Copy link
Contributor

@linkmauve linkmauve commented Oct 30, 2025

They were found thanks to the typos tool.

I’ve also added a typos.toml file to ignore the false positives found in this repository.

Summary by CodeRabbit

  • Bug Fixes

    • Corrected user-facing error message for string validation.
  • Documentation

    • Fixed multiple spelling and typo corrections in comments and documentation.
  • Chores

    • Added spell-check configuration file to the project.

@linkmauve linkmauve requested a review from a team as a code owner October 30, 2025 18:22
@linkmauve linkmauve requested review from tomtau and removed request for a team October 30, 2025 18:22
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2025

Walkthrough

This PR fixes multiple spelling and typographical errors across the codebase, including correcting typos in documentation comments, error messages, test variable names, and an internal module name. A typos.toml configuration file is introduced, likely for automated typo detection.

Changes

Cohort / File(s) Summary
Documentation & comment typo fixes
generator/src/docs.rs, meta/src/ast.rs, meta/src/validator.rs, pest/src/parser_state.rs
Corrected spelling errors in doc comments and inline comments: "grammer"→"grammar", "propaged"→"propagated", "identiers"→"identifiers", "wether"→"whether", "match_insensetive"→"match_insensitive", "parse_succeded"→"parse_succeeded"
Functional & message updates
grammars/src/lib.rs
Fixed user-facing error message "single qoutes" → "single quotes" and renamed test variable user_creation_password_without_single_qoutesuser_creation_password_without_single_quotes with corresponding test updates
Module renaming & optimization
meta/src/optimizer/mod.rs
Renamed internal module from rotater to rotator, updated call site in optimize pipeline, and corrected "propaged" → "propagated" in doc comment
Configuration
typos.toml
Added new typos configuration file with file exclusions and custom word mappings for typo detection

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Module rename verification: Ensure all references to the rotater module have been updated to rotator in the optimizer pipeline and no call sites were missed
  • Test variable consistency: Verify test variable renames and their usages throughout test files are consistent
  • User-facing message impact: Confirm the error message change in grammars/src/lib.rs is appropriately reflected in any documentation or error catalogs

Possibly related PRs

Suggested reviewers

  • NoahTheDuke
  • tomtau

Poem

🐰 A rabbit hopped through the code with glee,
Fixing typos for all the world to see,
"rotater" dances, now "rotator" it be,
Grammar perfected in harmony! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Fix typos across the tree" accurately and concisely summarizes the main change in the pull request. The PR contains multiple typo fixes across different files in the repository (correcting spellings like "grammer" to "grammar", "qoutes" to "quotes", "propaged" to "propagated", and renaming the "rotater" module to "rotator"), along with the addition of a typos.toml configuration file. The title is clear, specific, and avoids vague language or noise, effectively communicating that this is a comprehensive typo-fixing effort across the codebase.
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 ae1acca and 0c4231c.

📒 Files selected for processing (7)
  • generator/src/docs.rs (1 hunks)
  • grammars/src/lib.rs (3 hunks)
  • meta/src/ast.rs (1 hunks)
  • meta/src/optimizer/mod.rs (3 hunks)
  • meta/src/validator.rs (3 hunks)
  • pest/src/parser_state.rs (3 hunks)
  • typos.toml (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • meta/src/validator.rs
  • generator/src/docs.rs
🚧 Files skipped from review as they are similar to previous changes (3)
  • meta/src/ast.rs
  • grammars/src/lib.rs
  • typos.toml
🧰 Additional context used
🧬 Code graph analysis (1)
meta/src/optimizer/mod.rs (1)
meta/src/optimizer/rotator.rs (1)
  • rotate (12-43)
⏰ 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). (8)
  • GitHub Check: cargo hack check --feature-powerset
  • GitHub Check: check for semver compatibility
  • GitHub Check: Test Coverage
  • GitHub Check: Documentation check
  • GitHub Check: Unit, Style, and Lint Testing
  • GitHub Check: check for no_std compatibility
  • GitHub Check: Minimal Versions Testing
  • GitHub Check: Fuzzing
🔇 Additional comments (3)
pest/src/parser_state.rs (1)

431-431: LGTM! Documentation typos corrected.

The typo corrections properly reference the actual function names (match_insensitive) and parameter name (parse_succeeded).

Also applies to: 704-704, 1019-1019

meta/src/optimizer/mod.rs (2)

27-27: LGTM! Module name typo corrected.

The module rename from rotater to rotator corrects the spelling, and the call site is properly updated to maintain consistency.

Also applies to: 36-36


123-123: LGTM! Documentation typo corrected.

Fixed typo from "propaged" to "propagated" in the warning about semantic versioning.


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.

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: 2

🧹 Nitpick comments (1)
grammars/benches/main.i18n.json (1)

321-321: Optional: audit remaining potential typos.

"editor.suggest.showCustomcolors" still has lowercase 'c' in “colors”. If intentional, ignore; if not, consider aligning to “showCustomColors”.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c51e047 and ae1acca.

📒 Files selected for processing (8)
  • generator/src/docs.rs (1 hunks)
  • grammars/benches/main.i18n.json (29 hunks)
  • grammars/src/lib.rs (3 hunks)
  • meta/src/ast.rs (1 hunks)
  • meta/src/optimizer/mod.rs (3 hunks)
  • meta/src/validator.rs (3 hunks)
  • pest/src/parser_state.rs (3 hunks)
  • typos.toml (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
meta/src/optimizer/mod.rs (1)
meta/src/optimizer/rotator.rs (1)
  • rotate (12-43)
🔇 Additional comments (15)
meta/src/validator.rs (3)

328-328: LGTM! Documentation typo corrected.

Fixed "identiers" → "identifiers" in the assumption comment.


424-424: LGTM! Documentation typo corrected.

Fixed "identiers" → "identifiers" in the assumption comment.


462-462: LGTM! Documentation typo corrected.

Fixed "wether" → "whether" in the comment.

generator/src/docs.rs (1)

1-7: LGTM! Documentation typos corrected.

Fixed "gramamr" → "grammar" in both the module-level doc comment and the struct field documentation.

meta/src/optimizer/mod.rs (2)

27-36: LGTM! Module name corrected.

Renamed module from "rotater" to "rotator" with consistent usage update on line 36. The change is properly reflected in both the module declaration and its invocation.


123-123: LGTM! Documentation typo corrected.

Fixed "propaged" → "propagated" in the doc comment.

meta/src/ast.rs (1)

57-57: LGTM! Documentation typo corrected.

Fixed "propaged" → "propagated" in the doc comment (consistent with the same fix in meta/src/optimizer/mod.rs).

pest/src/parser_state.rs (3)

431-431: LGTM! Comment typo corrected.

Fixed "match_insensetive" → "match_insensitive" in the comment.


704-704: LGTM! Comment typo corrected.

Fixed "parse_succeded" → "parse_succeeded" in the comment.


1019-1019: LGTM! Comment typo corrected.

Fixed "parse_succeded" → "parse_succeeded" in the comment (consistent with line 704).

typos.toml (1)

1-8: LGTM! Typos configuration file added.

The configuration file correctly defines false positives (ba, jod, nd, ot, tham, ue, vai) to be ignored by the typos tool, preventing them from being flagged incorrectly in the codebase.

grammars/src/lib.rs (2)

297-297: LGTM! User-facing error message corrected.

Fixed "qoutes" → "quotes" in the error message string.


337-350: LGTM! Test variable name and expectations corrected.

Fixed "qoutes" → "quotes" consistently across:

  • Variable name on line 337
  • Variable usage on line 340
  • Test expectation string on line 350

All references are properly updated.

grammars/benches/main.i18n.json (2)

299-299: LGTM: typo/key fixes are correct and consistent.

  • multipleImplementations, iconDefinition.*, performanceIssueDescription, manageExtensions, toggleSelection, currentActiveMimeType (both occurrences), functionBreakPointExpressionAriaLabel, debugRequestMissing, sortByPrecedentLabel, peekTestOutput, runNoOutput, welcome.markStepIncomplete, openLooseFileMessage, errorInvalidResourceLanguageConfiguration, etc. look good.

Also applies to: 317-317, 336-336, 1640-1640, 1828-1829, 2291-2291, 2341-2341, 3866-3866, 3945-3945, 4305-4305, 4596-4596, 5151-5151, 6245-6245, 6546-6546, 8315-8315, 8365-8365, 8831-8831, 9054-9054, 9204-9204


2833-2833: Typo in key name: 'hideActivistBar' should be 'hideActivityBar'.

This introduces a wrong public key and will break lookups expecting 'hideActivityBar'.

Apply this diff:

-			"hideActivistBar": "隐藏活动栏",
+			"hideActivityBar": "隐藏活动栏",

Likely an incorrect or invalid review comment.

"id required": "扩展 ID 是必需的。",
"importKeyboardShortcutsFroms": "从 - 中迁移键盘快捷方式...",
"importKeyboardShortcutsForms": "从 - 中迁移键盘快捷方式...",
"install button": "安装",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Wrong key: 'importKeyboardShortcutsForms' → 'importKeyboardShortcutsFrom'.

This command id should be “From”, not “Forms”.

-			"importKeyboardShortcutsForms": "从 - 中迁移键盘快捷方式...",
+			"importKeyboardShortcutsFrom": "从 - 中迁移键盘快捷方式...",

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In grammars/benches/main.i18n.json around line 5093, the JSON key for the
command id is misspelled as "importKeyboardShortcutsForms"; change it to
"importKeyboardShortcutsFrom" (i.e., replace "Forms" with "From") and ensure the
surrounding JSON remains valid (commas/quotes intact) and update any other
occurrences of the incorrect key elsewhere in the repo if present.

Comment on lines 5708 to 5710
"copyingFile": "正在复制 {0} 资源",
"copynFile": "复制 {0} 资源",
"downloadBulkEdit": "下载 {0}",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Duplicate key and stray entry ('copynFile') create invalid/ambiguous JSON semantics.

  • "copyingFile" appears twice; last-wins in JSON is risky and unintended.
  • "copynFile" looks like a typo and likely unused.

Recommend deduplicating and removing the stray key.

Apply this diff to keep a single canonical entry and drop the typo:

-			"copyingFile": "正在复制 {0} 资源",
-			"copynFile": "复制 {0} 资源",
+			// keep the single canonical key defined earlier:
+			// "copyingFile": "正在复制 {0}",

If the “资源” variant is required by callers, retain only one "copyingFile" with the desired message and remove the other. Please confirm intended text and usages.


I need to verify the claims in this review comment. Let me search the JSON file and codebase for these keys.


🏁 Script executed:

#!/bin/bash
# Search for all occurrences of copyingFile and copynFile in the JSON file
echo "=== Searching for 'copyingFile' in main.i18n.json ==="
rg -n 'copyingFile' grammars/benches/main.i18n.json

echo -e "\n=== Searching for 'copynFile' in main.i18n.json ==="
rg -n 'copynFile' grammars/benches/main.i18n.json

echo -e "\n=== Context around lines 5708-5710 ==="
sed -n '5705,5715p' grammars/benches/main.i18n.json | cat -n

Length of output: 800


🏁 Script executed:

#!/bin/bash
# Search codebase for references to copynFile (excluding the definition)
echo "=== Searching codebase for 'copynFile' references ==="
rg -n 'copynFile' --type=js --type=ts --type=json -g '!**/main.i18n.json'

echo -e "\n=== Searching codebase for 'copyingFile' references ==="
rg -n 'copyingFile' --type=js --type=ts -g '!**/main.i18n.json' -C2 | head -50

Length of output: 259


Let me verify which version of copyingFile is actually used in the codebase:


🏁 Script executed:

#!/bin/bash
# Broader search for copyingFile references in code
echo "=== Searching for copyingFile in all code files ==="
fd --type f \( -name '*.js' -o -name '*.ts' -o -name '*.jsx' -o -name '*.tsx' \) | xargs rg 'copyingFile' 2>/dev/null | head -20

echo -e "\n=== Also check for any references to copynFile in JS/TS files ==="
fd --type f \( -name '*.js' -o -name '*.ts' -o -name '*.jsx' -o -name '*.tsx' \) | xargs rg 'copynFile' 2>/dev/null

Length of output: 920


Remove duplicate key "copyingFile" and unused typo "copynFile" from JSON i18n file.

Verification confirms the issues:

  • "copyingFile" appears twice (lines 5706 and 5708 in grammars/benches/main.i18n.json), causing JSON last-wins override behavior
  • "copynFile" (line 5709) has no references in the codebase—confirmed unused and likely a typo

The duplicate key will cause the second entry to override the first. Choose the correct message variant and remove both the duplicate "copyingFile" and the stray "copynFile" entry.

🤖 Prompt for AI Agents
In grammars/benches/main.i18n.json around lines 5708 to 5710, there is a
duplicate "copyingFile" key and an unused typo key "copynFile"; remove the
duplicate "copyingFile" entry (keep the correct variant already present at line
~5706) and delete the "copynFile" line so only the single, correct "copyingFile"
translation remains in the JSON.

@linkmauve
Copy link
Contributor Author

linkmauve commented Oct 31, 2025

This will have to be rebased on top of #1134 once it is merged, for CI to pass.

Copy link
Contributor

@tomtau tomtau left a comment

Choose a reason for hiding this comment

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

it's merged, you can rebase it now

They were found thanks to the typos[1] tool.

[1] https://github.com/crate-ci/typos
This one instructs typos to ignore the false positives found in this
repository.
@tomtau tomtau merged commit 79fbb67 into pest-parser:master Nov 1, 2025
9 checks passed
@linkmauve linkmauve deleted the fix-typos branch November 3, 2025 13:07
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