Repository navigation
Expand file tree
/
Copy path.swiftformat
More file actions
100 lines (98 loc) · 3.5 KB
/
Copy path.swiftformat
File metadata and controls
100 lines (98 loc) · 3.5 KB
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
--exclude .build
--exclude StarwarsExample/*/iOS/GraphQL
--exclude StarwarsExample/*/Packages/GraphQL
--exclude Tests/Fixtures/Generated
--exclude node_modules
--markcategories false
--self init-only # redundantSelf
--import-grouping testable-bottom # sortedImports
--trailing-commas always # trailingCommas
--indent 4 #indent
--ifdef no-indent #indent
--indent-strings false #indent
--wrap-arguments before-first # wrapArguments
--wrap-parameters before-first # wrapArguments
--wrap-collections before-first # wrapArguments
--wrap-conditions after-first # wrapArguments
--wrap-return-type never #wrapArguments
--wrap-effects never #wrapArguments
--call-site-paren balanced # wrapArguments
--wrap-type-aliases before-first # wrapArguments
--allow-partial-wrapping false # wrapArguments
--func-attributes prev-line # wrapAttributes
--computed-var-attributes prev-line # wrapAttributes
--stored-var-attributes same-line # wrapAttributes
--complex-attributes prev-line # wrapAttributes
--type-attributes prev-line # wrapAttributes
# --wrap-ternary before-operators # wrap
--wrap-string-interpolation preserve # wrap
--mark-struct-threshold 20 # organizeDeclarations
--mark-enum-threshold 20 # organizeDeclarations
--organize-types class,struct,enum,extension,actor,protocol # organizeDeclarations
--organizationmode type
--typeorder beforeMarks,nestedType,staticProperty,staticPropertyWithBody,staticMethod,classPropertyWithBody,classMethod,overriddenProperty,swiftUIPropertyWrapper,instanceProperty,instancePropertyWithBody,instanceLifecycle,overriddenMethod,instanceMethod,swiftUIProperty,swiftUIMethod
# --type-body-marks remove #organizeDeclarations (Intentionally disabled)
--extension-acl on-declarations # extensionAccessControl
--pattern-let inline # hoistPatternLet
--property-types inferred # redundantType, propertyTypes
# --type-blank-lines preserve # blankLinesAtStartOfScope, blankLinesAtEndOfScope (Intentionally disabled)
--ranges preserve # spaceAroundOperators
--operator-func no-space # spaceAroundOperators
--short-optionals always # typeSugar
--doc-comments preserve # docComments
# We recommend a max width of 100 but _strictly enforce_ a max width of 130
--max-width 130 # wrap
# Rules from airbnb/swift
--rules anyObjectProtocol
--rules blankLinesBetweenScopes
--rules consecutiveSpaces
--rules consecutiveBlankLines
--rules duplicateImports
--rules extensionAccessControl
--rules environmentEntry
--rules hoistPatternLet
--rules indent
--rules organizeDeclarations
--rules redundantParens
--rules redundantReturn
--rules redundantSelf
--rules redundantType
--rules redundantPattern
--rules redundantGet
--rules redundantFileprivate
--rules redundantRawValues
--rules redundantEquatable
--rules sortImports
--rules sortDeclarations
--rules strongifiedSelf
--rules trailingCommas
--rules trailingSpace
--rules linebreakAtEndOfFile
--rules typeSugar
--rules wrap
# --rules wrapMultilineStatementBraces
--rules wrapArguments
--rules wrapAttributes
--rules wrapEnumCases
# --rules wrapSwitchCases (Intentionally disabled)
--rules singlePropertyPerLine
--rules braces
--rules redundantClosure
--rules redundantInit
--rules redundantVoidReturnType
--rules redundantOptionalBinding
--rules redundantInternal
--rules redundantPublic
--rules redundantVariable
--rules unusedArguments
--rules spaceInsideBrackets
--rules spaceInsideBraces
--rules spaceAroundBraces
--rules spaceInsideParens
--rules spaceAroundParens
--rules spaceAroundOperators
--rules enumNamespaces
--rules blockComments
--rules docComments
--rules blankLinesAtStartOfScope
--rules blankLinesAtEndOfScope