-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.swiftformat
104 lines (96 loc) · 3.59 KB
/
.swiftformat
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# SwiftFormat configuration file
# Rules
--rules \
acronyms, \
andOperator, \
anyObjectProtocol, \
applicationMain, \
assertionFailures, \
blankLineAfterImports, \
blankLinesAroundMark, \
blankLinesBetweenChainedFunctions, \
blankLinesBetweenImports, \
blankLinesBetweenScopes, \
blockComments, \
braces, \
conditionalAssignment, \
consecutiveBlankLines, \
consecutiveSpaces, \
consistentSwitchCaseSpacing, \
duplicateImports, \
elseOnSameLine, \
emptyBraces, \
extensionAccessControl, \
fileHeader, \
hoistPatternLet, \
initCoderUnavailable, \
isEmpty, \
leadingDelimiters, \
linebreakAtEndOfFile, \
modifierOrder, \
numberFormatting, \
opaqueGenericParameters, \
redundantBackticks, \
redundantBreak, \
redundantClosure, \
redundantExtensionACL, \
redundantFileprivate, \
redundantGet, \
redundantInit, \
redundantInternal, \
redundantLet, \
redundantLetError, \
redundantNilInit, \
redundantObjc, \
redundantOptionalBinding, \
redundantParens, \
redundantPattern, \
redundantProperty, \
redundantRawValues, \
redundantStaticSelf, \
redundantType, \
redundantVoidReturnType, \
semicolons, \
sortImports, \
spaceAroundBraces, \
spaceAroundBrackets, \
spaceAroundComments, \
spaceAroundGenerics, \
spaceAroundOperators, \
spaceAroundParens, \
spaceInsideBraces, \
spaceInsideBrackets, \
spaceInsideComments, \
spaceInsideGenerics, \
spaceInsideParens, \
strongifiedSelf, \
todos, \
trailingClosures, \
trailingSpace, \
typeSugar, \
unusedArguments, \
void, \
wrapConditionalBodies, \
wrapLoopBodies, \
wrapSingleLineComments, \
yodaConditions
# Options
--swiftversion 5.9
--redundanttype inferred
--importgrouping testable-last
--ranges no-space
--patternlet inline
--header \n Copyright © Surf. All rights reserved.\n
# Excludes
#
# As for not .swift files:
#
# We don't specify files to exclude;
# Instead, we configure the runner script the way it checks only swift files
# That have changed from last commit
#
# As for .swift file:
#
# We don't want to change generated file and docs files
# We prefer to leave them as is.
--exclude Modules/Core/Resources/Sources/Resources/**/*.swift,Modules/App/Playbook/Documentation,Modules/App/Example/Documentation