-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathswiftformat.sh
executable file
·28 lines (27 loc) · 1.28 KB
/
swiftformat.sh
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
#! /usr/bin/env bash
OUTPUT=$(swiftformat \
--cache ignore \
\
--indent 4 \
--allman false \
--commas inline \
--semicolons inline \
\
--linebreaks lf \
\
--binarygrouping none \
--decimalgrouping none \
--hexliteralcase lowercase --hexgrouping none \
--octalgrouping none \
\
--wraparguments afterfirst \
--wrapcollections beforefirst \
\
--nospaceoperators \
--trimwhitespace always \
--disable blankLinesAroundMark,linebreakAtEndOfFile,hoistPatternLet,strongOutlets,unusedArguments,redundantBackticks,redundantSelf \
./Sources/)
if [ "$OUTPUT" ]; then
echo "$OUTPUT" >&2
exit 1
fi