Fix typos and improve documentation across various files#8230
Fix typos and improve documentation across various files#8230riderx wants to merge 8 commits intoionic-team:mainfrom
Conversation
- Fixed typo in CHANGELOG.md for Android and CLI regarding Typescript upgrade commit hash. - Corrected variable name from 'statememt' to 'statement' in MockCordovaWebViewImpl.java. - Updated comments and documentation in multiple files to fix spelling errors and improve clarity. - Changed 'overridenUserAgentString' to 'overriddenUserAgentString' in various iOS files for consistency. - Fixed minor typos in HttpRequestHandler.swift and WebViewDelegationHandler.swift. - Corrected test method names in BridgedTypesTests.swift and ConfigurationTests.swift for accuracy.
|
This is kinda neat - let me look into it. some issues.
|
markemer
left a comment
There was a problem hiding this comment.
SHA changes need a revert to start.
|
@markemer i will revert and add .typo.toml to ensure it doesn't do this |
Reverts the commit hash changes in CHANGELOG files where typos CLI incorrectly modified git commit hashes (e.g., 88d0ded -> 88d0dead). All other legitimate typo fixes from the previous commit are preserved. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add .typos.toml to prevent typos CLI from incorrectly modifying git commit hashes in CHANGELOG files while still checking for legitimate typos. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Hey @markemer we should be all good now do you want i merge the github action check in this one as well ? |
That one is a bigger deal - but this one should be an easy sell. |
|
The GitHub workflow was made only in the doc repo as PR ionic-team/capacitor-docs#481 |
.typos.toml
Outdated
| "ios/Capacitor/Capacitor.xcodeproj/xcshareddata/xcschemes/*.xcscheme", | ||
| "ios-pods-template/**/*.storyboard", | ||
| "ios-spm-template/**/*.storyboard", | ||
| "ios/Capacitor/TestsHostApp/**/*.storyboard", |
There was a problem hiding this comment.
We should exclude CHANGELOG.md so we don't modify any historical context, even if it has typos, IMO.
There was a problem hiding this comment.
I went back and forth on that. Probably ok, but yeah, we should probably exempt them, also would save us the SHA headache.
| "tgz": "application/x-compressed", | ||
| "thmx": "application/vnd.ms-officetheme", | ||
| "thn": "application/octet-stream", | ||
| "then": "application/octet-stream", |
There was a problem hiding this comment.
This should remain thn I believe.
| "tgz": "application/x-compressed", | ||
| "thmx": "application/vnd.ms-officetheme", | ||
| "thn": "application/octet-stream", | ||
| "then": "application/octet-stream", |
…files - Reverts "thn" (Thompson thumbnail format) back from incorrect "then" change - Adds "thn" to typos config to prevent future false positives - Excludes all CHANGELOG files from typos checking - Excludes Xcode project files (pbxproj, xcscheme, storyboard) that contain hex identifiers that should never be modified 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
@markemer i fixed all comment :) |
|
hey @eric-horodyski can you review again ? |
There was a problem hiding this comment.
Pull request overview
This PR applies typo fixes and minor documentation/comment clarifications across the iOS, Android, CLI, and core packages, and adds a .typos.toml configuration to standardize future typo checking.
Changes:
- Fixes spelling/typos in comments, docs, and test names across multiple targets.
- Renames several identifiers to corrected spellings (notably iOS User-Agent and JSValueEncoder float strategy labels).
- Adds
.typos.tomlconfiguration fortypos-cli.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| ios/Capacitor/CodableTests/NonconformingFloatCodableTests.swift | Updates test calls to use corrected JSValueEncoder init label. |
| ios/Capacitor/CodableTests/CodableTests.swift | Fixes typo in test function name. |
| ios/Capacitor/CapacitorTests/RouterTests.swift | Fixes typo in test function name. |
| ios/Capacitor/CapacitorTests/ConfigurationTests.swift | Updates tests to use corrected overriddenUserAgentString property. |
| ios/Capacitor/CapacitorTests/BridgedTypesTests.swift | Fixes typo in test comment. |
| ios/Capacitor/Capacitor/WebViewDelegationHandler.swift | Fixes typo in comment. |
| ios/Capacitor/Capacitor/UIStatusBarManager+CAPHandleTapAction.m | Fixes typo in swizzled selector/method name. |
| ios/Capacitor/Capacitor/Plugins/HttpRequestHandler.swift | Uses corrected overriddenUserAgentString property when setting header. |
| ios/Capacitor/Capacitor/Codable/JSValueEncoder.swift | Corrects doc + initializer argument label spelling (public API). |
| ios/Capacitor/Capacitor/Codable/JSValueDecoder.swift | Fixes typos in documentation/comments. |
| ios/Capacitor/Capacitor/CAPNotifications.swift | Fixes typo in header comment. |
| ios/Capacitor/Capacitor/CAPInstanceDescriptor.swift | Uses corrected overriddenUserAgentString property during config parsing. |
| ios/Capacitor/Capacitor/CAPInstanceDescriptor.h | Renames public property to corrected spelling (public API). |
| ios/Capacitor/Capacitor/CAPInstanceConfiguration.m | Updates ivar assignment to corrected property name. |
| ios/Capacitor/Capacitor/CAPInstanceConfiguration.h | Renames public property to corrected spelling (public API). |
| ios/Capacitor/Capacitor/CAPBridgeViewController.swift | Reads corrected overriddenUserAgentString property to set custom UA. |
| core/cordova.js | Fixes one typo in comment (but leaves another). |
| cli/src/util/spm.ts | Fixes typo in warning message. |
| cli/src/util/emoji.ts | Fixes typo in comment. |
| cli/src/tasks/migrate.ts | Renames local variables for clarity (typo/abbrev cleanup). |
| cli/src/sysconfig.ts | Fixes typo in doc comment. |
| cli/src/ios/doctor.ts | Fixes typo in comment. |
| cli/src/definitions.ts | Fixes typo in comment. |
| cli/src/declarations.ts | Fixes typo in comment. |
| cli/src/android/update.ts | Fixes typo in local variable name and its usage. |
| android/capacitor/src/main/java/com/getcapacitor/cordova/MockCordovaWebViewImpl.java | Fixes parameter name typo in deprecated method. |
| .typos.toml | Adds typos-cli configuration (ignore patterns/excludes/custom words). |
Comments suppressed due to low confidence (1)
cli/src/sysconfig.ts:31
- The doc comment is still grammatically incorrect: "Whether the user choose to signup" should be something like "Whether the user chooses to sign up" (or "chose to sign up"). Since this is documentation, it’s a good opportunity to fully correct it.
/**
* Whether the user choose to signup or not.
*
* If undefined, the prompt has not been shown.
*/
readonly signup?: boolean;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [default.extend-words] | ||
| # Add any custom words that should not be corrected | ||
| # Format: incorrectword = "incorrectword" | ||
| thn = "thn" |
There was a problem hiding this comment.
thn is added to the custom dictionary but doesn’t appear to exist anywhere in the repository (and looks like a typo of "then"). Consider removing it until there is a concrete false-positive to suppress, to avoid masking real typos.
| thn = "thn" |
| public init( | ||
| optionalEncodingStrategy: OptionalEncodingStrategy = .undefined, | ||
| dateEncodingStrategy: DateEncodingStrategy = .deferredToDate, | ||
| dataEncodingStrategy: DataEncodingStrategy = .deferredToData, | ||
| nonConformingFloatEncodingStategy: NonConformingFloatEncodingStrategy = .deferred | ||
| nonConformingFloatEncodingStrategy: NonConformingFloatEncodingStrategy = .deferred | ||
| ) { | ||
| self.options = .init( | ||
| optionalStrategy: optionalEncodingStrategy, | ||
| dateStrategy: dateEncodingStrategy, | ||
| dataStrategy: dataEncodingStrategy, | ||
| nonConformingFloatStrategy: nonConformingFloatEncodingStategy | ||
| nonConformingFloatStrategy: nonConformingFloatEncodingStrategy |
There was a problem hiding this comment.
Renaming the public initializer argument label from nonConformingFloatEncodingStategy to nonConformingFloatEncodingStrategy is a source-breaking API change for Swift callers. Consider keeping a deprecated overload with the old label (forwarding to the new init) or deferring this rename to a major version bump.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Corrected multiple typos and enhanced clarity in documentation throughout the codebase, ensuring consistency in variable names and comments.
I used typos-cli command to fix them and double checked by hands all was done properly