Skip to content

Route the Claude Code SwiftLint hook through rake lint#25641

Open
crazytonyli wants to merge 1 commit into
trunkfrom
task/cc-hook-swiftlint
Open

Route the Claude Code SwiftLint hook through rake lint#25641
crazytonyli wants to merge 1 commit into
trunkfrom
task/cc-hook-swiftlint

Conversation

@crazytonyli

Copy link
Copy Markdown
Contributor

Description

The Claude Code swiftlint hook runs whatever swiftlint binary is on PATH, which can drift from the version pinned in .swiftlint.yml. This PR makes rake lint and rake lintfix accept optional paths (rake lint[path1,path2]), and changes the hook to run the edited file through rake lint, so the hook always uses the same plugin-pinned SwiftLint binary and configuration as the rake lint command.

A warm single-file rake lint run takes about one to three seconds. The first run after a SwiftLint version bump re-resolves the BuildTools package, which is why the hook timeout is raised to 60 seconds.

rake lint and lintfix now accept optional paths and run SwiftLint via a shared
helper, so the hook uses the same plugin-pinned binary and configuration as the
project lint command instead of whatever swiftlint is on PATH.
@crazytonyli crazytonyli added this to the 27.0 milestone Jun 11, 2026
@crazytonyli crazytonyli requested a review from mokagio June 11, 2026 10:51
@wpmobilebot

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number32525
VersionPR #25641
Bundle IDorg.wordpress.alpha
Commit68d00a4
Installation URL6cf5lpseno960
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number32525
VersionPR #25641
Bundle IDcom.jetpack.alpha
Commit68d00a4
Installation URL7fe6kqdmg4oao
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

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.

2 participants