File tree Expand file tree Collapse file tree 3 files changed +34
-131
lines changed
Expand file tree Collapse file tree 3 files changed +34
-131
lines changed Original file line number Diff line number Diff line change 1+ name : SwiftFormat Check
2+
3+ on :
4+ push :
5+ branches :
6+ - ' **'
7+ pull_request :
8+ branches :
9+ - ' **'
10+
11+ jobs :
12+ format-check :
13+ name : SwiftFormat Check
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+
20+ - name : Install SwiftFormat
21+ run : |
22+ wget -O swiftformat.zip https://github.com/nicklockwood/SwiftFormat/archive/0.55.6.zip
23+ unzip swiftformat.zip
24+ cd SwiftFormat-0.55.6
25+ swift build -c release
26+ sudo cp .build/release/swiftformat /usr/local/bin/
27+
28+ - name : Check if SwiftFormat has been run
29+ run : |
30+ swiftformat --lint --config .swiftformat Split
31+ if [ $? -ne 0 ]; then
32+ echo "::error::SwiftFormat check failed. Please run SwiftFormat locally before pushing."
33+ exit 1
34+ fi
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments