-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.swiftlint.yml
More file actions
58 lines (48 loc) ยท 2.26 KB
/
.swiftlint.yml
File metadata and controls
58 lines (48 loc) ยท 2.26 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
# ๊ธฐ๋ณธ ์ ๊ณต ๊ท์น์์ ๋นํ์ฑํํ ๊ท์น๋ค
disabled_rules:
- colon # : ๋ค์ ๊ณต๋ฐฑ ๊ด๋ จ ๊ท์น, ๋นํ์ฑํ ๊ฒฐ์ ์ด ํ์
- comma # , ๋ค์ ๊ณต๋ฐฑ ๊ด๋ จ ๊ท์น, ๋นํ์ฑํ ๊ฒฐ์ ์ด ํ์
- control_statement # if, while, for ๋ฑ ๊ดํธ ๊ด๋ จ ๊ท์น
- trailing_whitespace # ์ฝ๋ ๋์ ๊ณต๋ฐฑ ๋ฐฉ์ง ๊ท์น, ๋นํ์ฑํ์ ์ฃผ์
- unneeded_override # ํ์์๋ ์ค๋ฒ๋ผ์ด๋ ๋ฉ์๋ ๊ด๋ จ ๊ท์น
- todo # todo ์์ฑ ์ ์๋ ๊ท์น
- unused_closure_parameter # ํด๋ก์ ํ๋ผ๋ฏธํฐ ๊ด๋ จ ๊ท์น
# ์ ํ์ ์ผ๋ก ํ์ฑํํ ๊ท์น๋ค (๊ธฐ๋ณธ ์ค์ ์ ์์ผ๋ ์ ์ฉํ ๊ท์น๋ค)
opt_in_rules:
- empty_count # .count == 0 ๋์ .isEmpty ๊ถ์ฅํ๋ ๊ท์น
- redundant_nil_coalescing # ๊ธฐ๋ณธ๊ฐ์ผ๋ก nil ์ค์ ๋ ๊ฒฝ์ฐ ๋ถํ์ํ ?? ์ฌ์ฉ ๋ฐฉ์ง
# ๊ท์น ์ค์ (๊ฐ๊ฐ์ ๊ท์น์ ๋ํด ๊ฒฝ๊ณ ์ ์๋ฌ ๊ธฐ์ค ์ค์ )
force_cast: warning # ๊ฐ์ ์บ์คํ
์ฌ์ฉ ์ ๊ฒฝ๊ณ
force_try:
severity: warning # ๊ฐ์ try ์ฌ์ฉ ์ ๊ฒฝ๊ณ
# ํ ์ค์ ์ต๋ ๊ธธ์ด ์ ํ
line_length:
- 150 # 150์๋ก ์ค์
# ํจ์์ ๋ฐ๋ ๊ธธ์ด ์ ํ
function_body_length:
warning: 100
# ํ์
์ ๋ฐ๋ ๊ธธ์ด ์ ํ (๊ฒฝ๊ณ ์ ์๋ฌ ๊ธฐ์ค)
type_body_length:
- 300 # ๊ฒฝ๊ณ : 300์ค
- 400 # ์๋ฌ: 400์ค
# ํ์ผ ๊ธธ์ด ์ ํ
file_length:
warning: 350 # 350์ค ์ด์์ด๋ฉด ๊ฒฝ๊ณ
error: 600 # 600์ค ์ด์์ด๋ฉด ์๋ฌ
# ํ์
๋ค์ด๋ฐ ๊ท์น (์ต์, ์ต๋ ๊ธธ์ด ์ค์ ๋ฐ ์์ธ ์ด๋ฆ)
type_name:
min_length: 4 # ๊ฒฝ๊ณ : ์ต์ 4์
max_length:
warning: 40 # ๊ฒฝ๊ณ : ์ต๋ 40์
error: 50 # ์๋ฌ: ์ต๋ 50์
excluded: # ์ ์ธํ ์ด๋ฆ
- iPhone
# ๋ณ์ ๋ฐ ์์ ์ด๋ฆ ๊ท์น (์ต์ ๊ธธ์ด ์ค์ ๋ฐ ์์ธ ์ด๋ฆ)
identifier_name:
min_length: 2
allowed_symbols: ["_"] # ์ธ๋์ค์ฝ์ด(_) ํ์ฉ
# ๋ฆฌํฌํ
ํ์ ์ค์ (Xcode ์คํ์ผ๋ก ์ค์ )
reporter: "xcode"
# ํน์ ํ์ผ์์ ์ด ๊ท์น์ ์ ์ธ
excluded:
- Popcorn/Source/Network/APIKey.swift # APIKey.swift ํ์ผ ์ ์ธ