File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 11
11
12
12
steps :
13
13
- uses : actions/checkout@v4
14
+
15
+ - name : Install Nick Lockwood's SwiftFormat
16
+ run : brew install swiftformat
17
+
14
18
- name : Check formatting
15
19
run : |
16
20
found_issues=false
@@ -31,14 +35,15 @@ jobs:
31
35
else
32
36
echo "✅ All Swift files are properly formatted!"
33
37
fi
38
+
34
39
- name : Suggest fixes (if check fails)
35
40
if : failure()
36
41
run : |
37
42
echo "### Here's how to fix the formatting locally:" >> $GITHUB_STEP_SUMMARY
38
43
echo '```bash' >> $GITHUB_STEP_SUMMARY
39
- echo "# Install swift-format if you haven't already" >> $GITHUB_STEP_SUMMARY
40
- echo "brew install swift-format " >> $GITHUB_STEP_SUMMARY
44
+ echo "# Install SwiftFormat if you haven't already" >> $GITHUB_STEP_SUMMARY
45
+ echo "brew install swiftformat " >> $GITHUB_STEP_SUMMARY
41
46
echo "" >> $GITHUB_STEP_SUMMARY
42
47
echo "# Format all Swift files" >> $GITHUB_STEP_SUMMARY
43
- echo 'find . -name "*.swift" -type f -exec swift-format format --in-place {} \; ' >> $GITHUB_STEP_SUMMARY
48
+ echo 'swiftformat --config .swiftformat . ' >> $GITHUB_STEP_SUMMARY
44
49
echo '```' >> $GITHUB_STEP_SUMMARY
Original file line number Diff line number Diff line change
1
+ --swiftversion 5.9
1
2
--acronyms ID,URL,UUID
2
3
--allman false
3
4
--anonymousforeach convert
63
64
--tabwidth unspecified
64
65
--throwcapturing
65
66
--trailingclosures
66
- --trimwhitespace always
67
67
--typeattributes preserve
68
68
--typeblanklines remove
69
69
--typemark "MARK: - %t"
83
83
--disable blankLineAfterImports,unusedArguments
84
84
--enable docComments
85
85
--disable enumnamespaces
86
+ --trimwhitespace nonblank-lines
You can’t perform that action at this time.
0 commit comments