Route the Claude Code SwiftLint hook through rake lint#25641
Open
crazytonyli wants to merge 1 commit into
Open
Route the Claude Code SwiftLint hook through rake lint#25641crazytonyli wants to merge 1 commit into
crazytonyli wants to merge 1 commit into
Conversation
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.
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 32525 | |
| Version | PR #25641 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 68d00a4 | |
| Installation URL | 6cf5lpseno960 |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 32525 | |
| Version | PR #25641 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 68d00a4 | |
| Installation URL | 7fe6kqdmg4oao |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
The Claude Code swiftlint hook runs whatever
swiftlintbinary is onPATH, which can drift from the version pinned in.swiftlint.yml. This PR makesrake lintandrake lintfixaccept optional paths (rake lint[path1,path2]), and changes the hook to run the edited file throughrake lint, so the hook always uses the same plugin-pinned SwiftLint binary and configuration as therake lintcommand.A warm single-file
rake lintrun 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.