Commit c4adb9b
authored
Add SwiftFormat lint check on pull requests (#599)
* Add SwiftFormat lint check on pull requests
Runs swiftformat --lint in a Linux container on every PR using the
same BuildTools pin (SwiftFormat 0.56.1) and flags as the local
Scripts/swiftformat.sh, so CI stays in sync with `swift run swiftformat`
on a developer machine.
Fails the check on any violation without rewriting files — contributors
fix formatting themselves and push, rather than having CI commit back
over their branch.
BuildTools/.build is cached by Package.resolved hash to keep subsequent
runs fast.
* Cancel in-flight lint runs when a newer push lands
Adds a concurrency group so rapid successive pushes to a PR branch
don't stack up multiple Lint runs — the in-progress run is cancelled
as soon as a newer commit arrives.1 parent 7d71ccf commit c4adb9b
1 file changed
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
0 commit comments