Sitelet https://github.com/MessageKit/MessageKit/pull/1907
Skip to content

Enforce make lint in CI - #1907

Merged
Kaspik merged 1 commit into
chore/example-dead-codefrom
ci/enforce-formatting
Aug 20, 2026
Merged

Enforce make lint in CI#1907
Kaspik merged 1 commit into
chore/example-dead-codefrom
ci/enforce-formatting

Conversation

@martinpucik

Copy link
Copy Markdown
Contributor

Stacked on #1906 (which is stacked on #1905). Review those first; this PR targets #1906's branch.

The problem

make lint fails on main:

$ swiftformat --lint .
Source input did not pass lint check.
46/125 files require formatting.

25 of those are in Sources, 13 in the example, 7 in Tests, and one is Dangerfile.swift.

Nothing ever ran it. There are workflows for the tests, the framework, the example app, and Danger — but none for lint, so the drift from the repo's own .swiftformat grew unchecked. Some of it is not cosmetic: AppDelegate.swift and AdvancedExampleViewController.swift had genuinely misindented lines.

The change

Two parts:

  1. A Lint workflow that installs SwiftFormat and SwiftLint and runs make lint on every PR.
  2. The formatting that workflow then demands, so it starts green.

The second part is the whole 46-file diff. It is swiftformat . output and nothing else — no hand edits. Almost all of it is two rules:

  • organizeDeclarations moving members into the configured order
  • redundantSelf dropping explicit self.

SwiftLint already passed and needed no changes.

Reviewing this

The diff is large but mechanical. To confirm it is only formatting, check out the branch and run swiftformat . on the parent commit — the result should be identical.

Verification

  • make lint exits 0.
  • MessageKit unit tests: 60 of 60 pass on an iPhone 17 simulator (iOS 27).
  • The example app builds, and its unit and UI tests pass.

🤖 Generated with Claude Code

`make lint` failed on `main`. SwiftFormat wanted changes in 46 of 125
files: 25 in `Sources`, 13 in the example, 7 in `Tests`, and
`Dangerfile.swift`. Nothing enforced it, so the drift kept growing.
There are workflows for the tests, the framework, the example and
Danger, but none for lint.

Add a Lint workflow that installs SwiftFormat and SwiftLint and runs
`make lint`, then apply the formatting it demands. The diff is entirely
`swiftformat .` output, mostly `organizeDeclarations` moving members and
`redundantSelf` dropping `self.`.

SwiftLint already passed and needed no changes.
@github-actions

Copy link
Copy Markdown
Warnings
⚠️ Big Pull Request - Please consider splitting up your changes into smaller Pull Requests.

Generated by 🚫 Danger Swift against 75b2e0d

@Kaspik
Kaspik merged commit f5fbd78 into main Aug 20, 2026
6 checks passed
@Kaspik
Kaspik deleted the ci/enforce-formatting branch August 20, 2026 05:38
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.

2 participants