Repair the formatting and linting entry points - #1904
Merged
Conversation
Kaspik
approved these changes
Aug 2, 2026
make format, make lint and the pre-commit hook all still invoked the SwiftPM plugins removed in 6bb47d5, so every one of them has been failing. Call the swiftformat and swiftlint binaries directly instead, and have the hook say so when swiftformat is missing. Also modernise the config: --swiftversion tracked 5.6 while the package builds in Swift 6 language mode, and sortedImports was renamed to sortImports. Neither changes the set of files that need formatting.
martinpucik
force-pushed
the
swiftformat-tooling
branch
from
August 2, 2026 15:34
d3a93f6 to
e100669
Compare
martinpucik
enabled auto-merge
August 2, 2026 15:34
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.
What does this implement/fix? Explain your changes.
make format,make lintandScripts/pre-commitall still invoke the SwiftPM plugins that were deleted in 6bb47d5 ("Remove plugins that caused issues, migrate to swift 6"), so all three have been failing since October 2024:Package.swifthas no plugins, and this PR deliberately does not add any back — that would put the dependency on every MessageKit consumer. Instead the targets call theswiftformatandswiftlintbinaries directly, and the pre-commit hook now reports a missingswiftformatwith an install hint rather than silently doing nothing.Also modernises
.swiftformat, which had drifted:--swiftversionsaid5.6while the package builds in Swift 6 language mode.sortedImportswas renamed tosortImportsupstream and emitted a deprecation warning on every run.Verified against SwiftFormat 0.62.1 — the version preinstalled on the CI runners — that neither change alters which files need formatting, so this is purely a config refresh.
Does this close any currently open issues?
No.
Any other comments?
This intentionally does not reformat the codebase. 47 of 123 files currently fail
swiftformat --lint, somake lintwill still report failures after this lands — the entry points work again, but the existing drift is untouched.That reformat is deliberately left for a follow-up, because it touches
Sources/Views/MessagesCollectionView.swift, which #1832 is currently modifying. Doing it here would force that contributor to rebase. The drift breaks down as roughly 252organizeDeclarations, 49indent, 29wrapand 13trailingSpaceviolations — about+1032/-1010across 47 files.Where has this been tested?
Locally, with SwiftFormat 0.62.1 and SwiftLint 0.65.0 (the versions on the CI images):
make lintruns and correctly fails on the pre-existing drift, with no deprecation warnings.make formatruns and formats 47/123 files, confirming the target works end to end. That result was then discarded, since reformatting is out of scope here.🤖 Generated with Claude Code