Skip to content

Fix CI lint failures after the SwiftFormat 0.64.1 update - #1475

Merged
lujjjh merged 1 commit into
mainfrom
chore/swiftformat-0.64.1
Oct 24, 2026
Merged

lujjjh merged 1 commit into
mainfrom
chore/swiftformat-0.64.1

Conversation

@lujjjh

@lujjjh lujjjh commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

CI installs the latest SwiftFormat from Homebrew (brew upgrade swiftformat), so the lint step now runs SwiftFormat 0.64.1. That version flags 40 files already on main, mostly for repeatedGuard, indent and wrap. As a result, make lint fails on every pull request, for example in #1472, whatever the PR changes.

This PR reformats the repository with SwiftFormat 0.64.1 using the existing .swiftformat config. There are no manual code changes.

  • repeatedGuard merges consecutive guard statements with identical bodies into one guard. Behavior stays the same.
  • indent / wrap re-indent multi-line guard conditions.

Verification

  • swiftformat --lint . reports 0/431 files require formatting
  • swiftlint . reports no errors
  • xcodebuild build (unsigned) succeeds
  • swift test passes for HIDPP, GestureKit, DockKit and PointerKit

🤖 Generated with Claude Code

CI installs the latest SwiftFormat from Homebrew, and 0.64.1 flags 40
existing files (mainly repeatedGuard, indent and wrap), failing the lint
step for every pull request. Apply the new formatting so lint passes again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@lujjjh lujjjh added the bug Something isn't working label Oct 24, 2026
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 843d9a0 and ab8b03d.

Files selected for processing: 40
  • LinearMouse/Device/Device.swift
  • LinearMouse/Device/DeviceManager.swift
  • LinearMouse/Device/LogitechSettings/Device+LogitechDPI.swift
  • LinearMouse/Device/LogitechSettings/Device+LogitechHiResWheel.swift
  • LinearMouse/Device/ReceiverMonitor.swift
  • LinearMouse/Device/VendorSpecific/BatteryDeviceMonitor.swift
  • LinearMouse/Device/VendorSpecific/ConnectedBatteryDeviceInventory.swift
  • LinearMouse/Device/VendorSpecific/ConnectedLogitechDeviceInventory.swift
  • LinearMouse/Device/VendorSpecific/Logitech/HIDPP/LogitechHIDPPDeviceMetadataProvider.swift
  • LinearMouse/Device/VendorSpecific/Logitech/HIDPP/LogitechHIDPPFeatureTargetResolver.swift
  • LinearMouse/EventTransformer/ButtonActionExecutor.swift
  • LinearMouse/EventTransformer/ButtonMappingEngine.swift
  • LinearMouse/EventTransformer/EventTransformerManager.swift
  • LinearMouse/EventTransformer/GestureButtonTransformer.swift
  • LinearMouse/EventTransformer/UniversalBackForwardTransformer.swift
  • LinearMouse/Model/Configuration/Scheme/Buttons/Gesture/Gesture.swift
  • LinearMouse/Model/Configuration/Scheme/Buttons/Mapping/Mapping.swift
  • LinearMouse/Model/Configuration/Scheme/Buttons/Mapping/StructuredMapping.swift
  • LinearMouse/Model/Configuration/Scheme/If/If.swift
  • LinearMouse/Model/Configuration/Scheme/Scheme.swift
  • LinearMouse/Model/Configuration/Scheme/Scrolling/Distance.swift
  • LinearMouse/State/DeviceState.swift
  • LinearMouse/State/SettingsState.swift
  • LinearMouse/UI/Header/AppIndicator/AppPickerSheet/AppPicker.swift
  • LinearMouse/UI/Header/AppIndicator/AppPickerSheet/AppPickerState.swift
  • LinearMouse/UI/PermissionAppDragSource.swift
  • LinearMouse/UI/StatusItem.swift
  • LinearMouse/Utilities/ApplicationBundle.swift
  • LinearMouse/Utilities/WindowInfo.swift
  • LinearMouse/WindowFocus/HoverWindowQuery.swift
  • Modules/GestureKit/Sources/GestureKit/GestureEvent+NavigationSwipe.swift
  • Modules/HIDPP/Sources/HIDPP/Features/AdjustableDPI.swift
  • Modules/HIDPP/Sources/HIDPP/Features/HiResWheel.swift
  • Modules/HIDPP/Sources/HIDPP/HIDPPTransport.swift
  • Modules/KeyKit/Sources/KeyKit/KeySimulator.swift
  • Modules/KeyKit/Sources/KeyKit/SymbolicHotKey.swift
  • Modules/PointerKit/Sources/PointerKit/Extensions/IOHIDServiceClient+Property.swift
  • Modules/PointerKit/Sources/PointerKit/Extensions/IOHIDServiceClient+Service.swift
  • Modules/PointerKit/Sources/PointerKit/PointerDevice.swift
  • Modules/PointerKit/Sources/PointerKit/PointerDeviceManager.swift

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

This PR consolidates guard checks and reformats expressions across device, event, configuration, state, UI, and platform code. Flag-change and keyboard events now use HID-event copying and sender-ID lookup, with the default snapshot returned only when copying fails.

Changes: Guard Consolidation

Layer / File(s) Summary
Device discovery and Logitech controls
LinearMouse/Device/Device.swift, LinearMouse/Device/DeviceManager.swift, LinearMouse/Device/LogitechSettings/*, LinearMouse/Device/ReceiverMonitor.swift, LinearMouse/Device/VendorSpecific/*
Combines or reformats checks in device event handling, receiver discovery, battery inventories, and Logitech control paths. Flag-change and keyboard events now use HID-event copying and sender-ID lookup, returning the default snapshot only if copying fails.
Event and gesture processing
LinearMouse/EventTransformer/*, Modules/GestureKit/Sources/GestureKit/GestureEvent+NavigationSwipe.swift
Combines existing checks in event transformation, gesture mapping, navigation swipes, and button actions. Existing failure outcomes remain unchanged.
Configuration, state, and UI checks
LinearMouse/Model/Configuration/Scheme/*, LinearMouse/State/*, LinearMouse/UI/*, LinearMouse/Utilities/*, LinearMouse/WindowFocus/*
Combines validation and state checks across scheme matching, device selection, app picking, battery display, and window handling. The deprecation annotation moves to the Scheme.Buttons extension.
HID, keyboard, and pointer modules
Modules/HIDPP/Sources/HIDPP/*, Modules/KeyKit/Sources/KeyKit/*, Modules/PointerKit/Sources/PointerKit/*
Combines or reformats existing checks in HID++, KeyKit, and PointerKit. Their existing failure behavior remains unchanged.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Suggested reviewers: drmatrix85

Merge Risk: Minimal · up to ab8b0

No actionable issue remains; the PR is ready to merge after normal checks.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly identifies the main change: fixing CI lint failures caused by the SwiftFormat 0.64.1 update.
Description check Passed The description directly explains the SwiftFormat update, the formatting changes, the absence of manual code changes, and the reported verification results.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@lujjjh lujjjh added ignore for release and removed bug Something isn't working labels Oct 24, 2026
@lujjjh
lujjjh merged commit 9570976 into main Oct 24, 2026
2 checks passed
@lujjjh
lujjjh deleted the chore/swiftformat-0.64.1 branch October 24, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant