-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.swiftformat
70 lines (67 loc) · 5.16 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
--swiftversion 5.3
--allman false #Use allman indentation style: "true" or "false" (default)
# --assetliterals #Color/image literal width. "actual-width" or "visual-width"
--beforemarks #Declarations placed before first mark (e.g. typealias,struct)
# --binarygrouping #Binary grouping,threshold (default: 4,8) or "none", "ignore"
# --categorymark #Template for category mark comments. Defaults to "MARK: %c"
# --classthreshold #Minimum line count to organize class body. Defaults to 0
--closingparen balanced #Closing paren position: "balanced" (default) or "same-line"
--commas always #Commas in collection literals: "always" (default) or "inline"
--decimalgrouping 3 #Decimal grouping,threshold (default: 3,6) or "none", "ignore"
--elseposition same-line #Placement of else/catch: "same-line" (default) or "next-line"
# --enumthreshold #Minimum line count to organize enum body. Defaults to 0
# --exponentcase #Case of 'e' in numbers: "lowercase" or "uppercase" (default)
# --exponentgrouping #Group exponent digits: "enabled" or "disabled" (default)
--extensionacl on-declarations #Place ACL "on-extension" (default) or "on-declarations"
# --extensionlength #Minimum line count to organize extension body. Defaults to 0
--extensionmark #Mark for standalone extensions. Defaults to "MARK: - %t + %c"
# --fractiongrouping #Group digits after '.': "enabled" or "disabled" (default)
--funcattributes prev-line #Function @attributes: "preserve", "prev-line", or "same-line"
# --groupedextension #Mark for extension grouped with extended type. ("MARK: %c")
# --guardelse #Guard else: "same-line", "next-line" or "auto" (default)
# --header #Header comments: "strip", "ignore", or the text you wish use
# --hexgrouping #Hex grouping,threshold (default: 4,8) or "none", "ignore"
--hexliteralcase lowercase #Casing for hex literals: "uppercase" (default) or "lowercase"
--ifdef no-indent #if indenting: "indent" (default), "no-indent" or "outdent"
# --importgrouping #"testable-top", "testable-bottom" or "alphabetized" (default)
--indent 2 #Number of spaces to indent, or "tab" to use tabs
# --indentcase #Indent cases inside a switch: "true" or "false" (default)
# --lifecycle #Names of additional Lifecycle methods (e.g. viewDidLoad)
# --linebreaks #Linebreak character to use: "cr", "crlf" or "lf" (default)
# --markextensions #Mark extensions "always" (default), "never", "if-not-empty"
# --marktypes #Mark types "always" (default), "never", "if-not-empty"
--maxwidth 120 #Maximum length of a line before wrapping. defaults to "none"
# --modifierorder #Comma-delimited list of modifiers in preferred order
--nospaceoperators ...,..< #Comma-delimited list of operators without surrounding space
# --nowrapoperators #Comma-delimited list of operators that shouldn't be wrapped
# --octalgrouping #Octal grouping,threshold (default: 4,8) or "none", "ignore"
# --operatorfunc #Spacing for operator funcs: "spaced" (default) or "no-space"
# --organizetypes #Declarations to organize (defaults to struct,class,enum)
--patternlet hoist #let/var placement in patterns: "hoist" (default) or "inline"
# --ranges #Spacing for ranges: "spaced" (default) or "no-space"
--self init-only #Explicit self: "insert", "remove" (default) or "init-only"
# --selfrequired #Comma-delimited list of functions with @autoclosure arguments
--semicolons never #Allow semicolons: "never" or "inline" (default)
# --shortoptionals #Use ? for Optionals "always" (default) or "except-properties"
# --smarttabs #Align code independently of tab width. defaults to "enabled"
--stripunusedargs closure-only #"#closure-only", "unnamed-only" or "always" (default)
# --structthreshold #Minimum line count to organize struct body. Defaults to 0
# --tabwidth #The width of a tab character. Defaults to "unspecified"
# --trailingclosures #Comma-delimited list of functions that use trailing closures
--trimwhitespace always #Trim trailing space: "always" (default) or "nonblank-lines"
--typeattributes prev-line #Type @attributes: "preserve", "prev-line", or "same-line"
# --typemark #Template for type mark comments. Defaults to "MARK: - %t"
--varattributes prev-line #Property @attributes: "preserve", "prev-line", or "same-line"
# --voidtype #How Void types are represented: "void" (default) or "tuple"
--wraparguments before-first #Wrap all arguments: "before-first", "after-first", "preserve"
--wrapcollections before-first #Wrap array/dict: "before-first", "after-first", "preserve"
--wrapconditions before-first #Wrap conditions: "before-first", "after-first", "preserve"
--wrapparameters before-first #Wrap func params: "before-first", "after-first", "preserve"
--wrapreturntype preserve #Wrap return type: "if-multiline", "preserve" (default)
# --xcodeindentation #Match Xcode indenting: "enabled" or "disabled" (default)
# --yodaswap #Swap yoda values: "always" (default) or "literals-only"
# Doesn't play well with RxSwift
--disable trailingclosures
# Redudant types can improve compilation speed
--disable redundantType
--exclude Pods, MinervaExample/Generated