Skip to content

Conversation

@riderx
Copy link

@riderx riderx commented Nov 11, 2025

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

- 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.
@markemer
Copy link
Member

markemer commented Nov 12, 2025

This is kinda neat - let me look into it. some issues.

  • We shouldn't point to crate-ci/typos@master
    • I swore there was a workflow in here? Is that another PR I lost track of?
  • This checker seems to change github SHAs in markdown, which is not ok.
  • Also, the docs changes are no brainers, but the spelling corrections on public methods may be breaking changes. I don't actually think they are in most cases, but I need to check

Copy link
Member

@markemer markemer left a comment

Choose a reason for hiding this comment

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

SHA changes need a revert to start.

@riderx
Copy link
Author

riderx commented Nov 12, 2025

@markemer i will revert and add .typo.toml to ensure it doesn't do this

riderx and others added 2 commits November 12, 2025 18:06
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>
@riderx
Copy link
Author

riderx commented Nov 12, 2025

Hey @markemer we should be all good now do you want i merge the github action check in this one as well ?

@markemer
Copy link
Member

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.

@riderx
Copy link
Author

riderx commented Nov 12, 2025

The GitHub workflow was made only in the doc repo as PR ionic-team/capacitor-docs#481
I made it here as separate PR as well, added at lint stage #8232

.typos.toml Outdated
"ios/Capacitor/Capacitor.xcodeproj/xcshareddata/xcschemes/*.xcscheme",
"ios-pods-template/**/*.storyboard",
"ios-spm-template/**/*.storyboard",
"ios/Capacitor/TestsHostApp/**/*.storyboard",
Copy link
Member

Choose a reason for hiding this comment

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

We should exclude CHANGELOG.md so we don't modify any historical context, even if it has typos, IMO.

Copy link
Member

Choose a reason for hiding this comment

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

I went back and forth on that. Probably ok, but yeah, we should probably exempt them, also would save us the SHA headache.

Copy link
Author

Choose a reason for hiding this comment

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

i wasn't sure i will update PR

"tgz": "application/x-compressed",
"thmx": "application/vnd.ms-officetheme",
"thn": "application/octet-stream",
"then": "application/octet-stream",
Copy link
Member

Choose a reason for hiding this comment

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

This should remain thn I believe.

Copy link
Member

Choose a reason for hiding this comment

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

Yep - I found that one too.

"tgz": "application/x-compressed",
"thmx": "application/vnd.ms-officetheme",
"thn": "application/octet-stream",
"then": "application/octet-stream",
Copy link
Member

Choose a reason for hiding this comment

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

Caught another one.

Copy link
Member

@eric-horodyski eric-horodyski left a comment

Choose a reason for hiding this comment

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

This comment was accidentally left here, please ignore.

…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>
@riderx
Copy link
Author

riderx commented Nov 14, 2025

@markemer i fixed all comment :)

@riderx
Copy link
Author

riderx commented Nov 25, 2025

hey @eric-horodyski can you review again ?

Copilot AI review requested due to automatic review settings February 10, 2026 02:07
Copy link

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

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.toml configuration for typos-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"
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
thn = "thn"

Copilot uses AI. Check for mistakes.
Comment on lines 76 to +86
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
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
riderx and others added 3 commits February 10, 2026 02:15
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>
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.

3 participants