Enforce make lint in CI - #1907
Merged
Merged
Conversation
`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.
Generated by 🚫 Danger Swift against 75b2e0d |
Kaspik
approved these changes
Aug 20, 2026
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.
Stacked on #1906 (which is stacked on #1905). Review those first; this PR targets #1906's branch.
The problem
make lintfails onmain:25 of those are in
Sources, 13 in the example, 7 inTests, and one isDangerfile.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
.swiftformatgrew unchecked. Some of it is not cosmetic:AppDelegate.swiftandAdvancedExampleViewController.swifthad genuinely misindented lines.The change
Two parts:
Lintworkflow that installs SwiftFormat and SwiftLint and runsmake linton every PR.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:organizeDeclarationsmoving members into the configured orderredundantSelfdropping explicitself.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 lintexits 0.🤖 Generated with Claude Code