-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.swiftformat
185 lines (145 loc) · 7.01 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
###################################### file options ###############################################
--exclude Tests/XCTestManifests.swift,Tests/BadConfig,Snapshots,Build,PluginTests
##################################### format options ##############################################
# swift version을 설정 합니다.
--swiftversion 5.7
# braces 규칙 옵션
# if 열림 중괄호를 개행하지 않고 사용합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#braces
--allman false
# trailingCommas 규칙 옵션
# Collection 마지막의 `,`를 사용하지 않습니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#trailingCommas
--commas inline
# numberFormatting 규칙 옵션
# Decimal 값을 3개 단위로 언더바(_)를 사용하여 분리 합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#numberFormatting
--decimalgrouping 3
# numberFormatting 규칙 옵션
# Hex 값을 2개 단위로 언더바(_)를 사용하여 분리 합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#numberFormatting
--hexgrouping 2
# numberFormatting 규칙 옵션
# Hex 값을 대문자로 사용 합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#numberFormatting
--hexliteralcase uppercase
# elseOnSameLine 규칙 옵션
# if 닫힘 중괄호와 else 문을 같은 라인에 작성 합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#elseOnSameLine
--elseposition same-line
# indent 규칙 옵션
# 전처리문 #if의 내부 코드 블럭 indent를 사용하지 않습니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#indent
--ifdef no-indent
# indent 규칙 옵션
# 들여쓰기는 2칸으로 사용 합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#indent
--indent 2
# indent 규칙 옵션
# Switch문의 case는 들여쓰기를 사용 합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#indent
--indentcase true
# sortedImports 규칙 옵션
# import 문을 사전순으로 정렬합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#sortedImports
--importgrouping alpha
# wrapSingleLineComments 규칙 옵션
# 지정된 을(를) 초과하는 한 줄 주석을 래핑 합니다
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#wrapSingleLineComments
--maxwidth 99
# spaceAround 규칙 옵션
# 연산자 기능의 간격을 설정 합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#spaceAround
--operatorfunc spaced
# spaceAround 규칙 옵션
# Range 기능의 간격을 설정 합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#spaceAround
--ranges spaced
# hoistPatternLet 규칙 옵션
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#hoistpatternlet
--patternlet hoist
# redundantSelf 규칙 옵션
# 생성자에서 멤버 변수에 self를 사용합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#redundantSelf
--self init-only
# semicolons 규칙 옵션
# 세미콜론을 제거합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#semicolons
--semicolons inline
# unusedArguments 규칙 옵션
# 클로저에서 사용하지 않는 함수 인수를 언더바(_)로 표시 합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#unusedArguments
--stripunusedargs closure-only
# trailingSpace 규칙 옵션
# 줄 끝에서 후행 공백을 제거합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#trailingSpace
--trimwhitespace always
# extensionAccessControl 규칙 옵션
# Extension 접근제어자 작성 시 func에 작성 합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#extensionAccessControl
--extensionacl on-declarations
# wrapArguments 규칙 옵션
# Wrap Arguments를 before-first 방식으로 사용 합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#wrapArguments
--wraparguments before-first
# wrapArguments 규칙 옵션
# Wrap Parametes를 before-first 방식으로 사용 합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#wrapArguments
--wrapparameters before-first
# wrapArguments 규칙 옵션
# Wrap Collections를 before-first 방식으로 사용 합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#wrapArguments
--wrapcollections before-first
# wrapArguments 규칙 옵션
# Wrap typealiases를 before-first 방식으로 사용 합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#wrapArguments
--wraptypealiases before-first
# wrapArguments 규칙 옵션
# Arguments를 after-first 방식으로 사용 합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#wrapArguments
# example
# good case
# guard let a = a else {
# return
# }
# bad case
# guard
# let a = a else {
# return
# }
--wrapconditions after-first
####################################### enable rules ##############################################
# collection.count == 0 과 비교 하는 것보다 우선 isEmpty를 사용합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#isempty
--enable isEmpty
# 블록 주석을 한 줄 주석으로 변경합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#blockComments
--enable blockComments
# import 이후에 개행을 사용합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#blankLineAfterImports
--enable blankLineAfterImports
# 선언 이전의 주석에는 문서 주석을 사용하십시오.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#docComments
--enable docComments
# 인라인 조건문의 본문을 새 줄로 래핑합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#wrapConditionalBodies
--enable wrapConditionalBodies
# 한 줄에 하나의 enum 케이스를 작성합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#wrapEnumCases
--enable wrapEnumCases
# 한 줄에 하나의 스위치 케이스를 작성합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#wrapSwitchCases
--enable wrapSwitchCases
####################################### disable rules #############################################
# keyPath 기반 구문으로 변환합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#preferKeyPath
--disable preferKeyPath
# 변수 선언에서 중복 유형을 제거 합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#redundantType
--disable redundantType
# 여러 줄 문의 여는 중괄호를 묶습니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#wrapMultilineStatementBraces
--disable wrapMultilineStatementBraces
# enum 사례에 대한 중복 원시 문자열 값을 제거합니다.
# https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#redundantRawValues
--disable redundantRawValues