Skip to content

Commit fc99b06

Browse files
authored
Merge pull request #21 from YAPP-Github/BOOK-41-chore/#20
chore: swiftlint & coderabbit 세팅
2 parents 41ce0a8 + 2f454ff commit fc99b06

12 files changed

Lines changed: 197 additions & 10 deletions

File tree

.coderabbit.yaml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
language: ko-KR
2+
3+
early_access: true
4+
enable_free_tier: true
5+
6+
reviews:
7+
profile: chill
8+
request_changes_workflow: true
9+
high_level_summary: true
10+
high_level_summary_placeholder: '@coderabbitai 요약'
11+
auto_title_placeholder: '@coderabbitai'
12+
poem: true
13+
review_status: true
14+
collapse_walkthrough: false
15+
16+
abort_on_close: true
17+
18+
auto_review:
19+
enabled: true
20+
auto_incremental_review: true
21+
ignore_title_keywords: []
22+
labels: []
23+
drafts: false
24+
base_branches: []
25+
26+
tools:
27+
shellcheck:
28+
enabled: true
29+
ruff:
30+
enabled: true
31+
markdownlint:
32+
enabled: true
33+
github-checks:
34+
enabled: true
35+
timeout_ms: 90000
36+
languagetool:
37+
enabled: true
38+
disabled_rules:
39+
- EN_UNPAIRED_BRACKETS
40+
- EN_UNPAIRED_QUOTES
41+
disabled_categories:
42+
- TYPOS
43+
- TYPOGRAPHY
44+
- CASING
45+
enabled_only: false
46+
level: default
47+
enabled_rules: []
48+
enabled_categories: []
49+
biome:
50+
enabled: true
51+
hadolint:
52+
enabled: true
53+
swiftlint:
54+
enabled: true
55+
phpstan:
56+
enabled: true
57+
level: default
58+
golangci-lint:
59+
enabled: true
60+
yamllint:
61+
enabled: true
62+
gitleaks:
63+
enabled: true
64+
checkov:
65+
enabled: true
66+
ast-grep:
67+
packages: []
68+
rule_dirs: []
69+
util_dirs: []
70+
essential_rules: true
71+
72+
chat:
73+
auto_reply: true
74+
75+
knowledge_base:
76+
web_search:
77+
enabled: true
78+
learnings:
79+
scope: auto
80+
issues:
81+
scope: auto
82+
jira:
83+
project_keys: []

src/.swiftlint.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
disabled_rules:
2+
- trailing_whitespace
3+
4+
opt_in_rules:
5+
- attributes
6+
- closure_spacing
7+
- colon
8+
- operator_usage_whitespace
9+
- fatal_error_message
10+
- trailing_closure
11+
- empty_count
12+
- function_default_parameter_at_end
13+
- prefer_self_in_static_references
14+
- identifier_name # 사용 전 Rule 확인 필요
15+
- sorted_imports # 알파벳 순서대로 임포트
16+
- duplicate_imports # 중복 임포트 제거
17+
- indentation_width
18+
19+
analyzer_rules:
20+
- unused_declaration
21+
22+
line_length:
23+
warning: 120
24+
error: 200
25+
26+
type_name:
27+
min_length:
28+
warning: 3
29+
error: 1
30+
max_length:
31+
warning: 40
32+
error: 50
33+
validates_start_with_lowercase: warning
34+
35+
identifier_name:
36+
min_length: 3
37+
38+
function_body_length:
39+
warning: 30
40+
error: 50
41+
42+
type_body_length:
43+
warning: 200
44+
error: 400
45+
46+
colon:
47+
flexible_right_spacing: false
48+
apply_to_dictionaries: true
49+
50+
operator_usage_whitespace:
51+
severity: warning
52+
53+
control_statement:
54+
severity: warning
55+
if_else: false
56+
57+
void_return:
58+
severity: warning
59+
60+
custom_rules:
61+
ios17_uikit_api_usage:
62+
name: "iOS 17+ UIKit API 사용"
63+
regex: '\b(UITextView\.TextLayoutManager|UIPasteControl|UIBackgroundConfiguration\.cornerRadius|SectionHeaderPinToVisibleBounds|UIView\.animationsEnabled|UIEditingOverlayViewController)\b'
64+
message: "이 UIKit API는 iOS 17 이상에서만 사용할 수 있습니다. 최소 지원 버전을 확인하거나 @available(iOS 17, *)로 감싸세요."
65+
severity: warning

src/Projects/BKCore/Project.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ let project = Project.project(
99
product: Project.product,
1010
bundleId: "core." + Project.bundleID,
1111
sources: .sources,
12+
scripts: [
13+
swiftLintScript
14+
],
1215
dependencies: [
1316
]
1417
),
18+
1519
Target.target(
1620
name: "\(BKModule.BKCore.rawValue)Test",
1721
product: .unitTests,

src/Projects/BKData/Project.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ let project = Project.project(
99
product: Project.product,
1010
bundleId: "data." + Project.bundleID,
1111
sources: .sources,
12+
scripts: [
13+
swiftLintScript
14+
],
1215
dependencies: [
1316
.core(),
1417
]

src/Projects/BKDesign/Project.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ let project = Project.project(
1010
bundleId: "design." + Project.bundleID,
1111
sources: .sources,
1212
resources: .default,
13+
scripts: [
14+
swiftLintScript
15+
],
1316
dependencies: [
1417
.core(),
1518
]

src/Projects/BKDomain/Project.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ let project = Project.project(
99
product: Project.product,
1010
bundleId: "domain." + Project.bundleID,
1111
sources: .sources,
12+
scripts: [
13+
swiftLintScript
14+
],
1215
dependencies: [
1316
.core(),
1417
]

src/Projects/BKNetwork/Project.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ let project = Project.project(
99
product: Project.product,
1010
bundleId: "network." + Project.bundleID,
1111
sources: .sources,
12+
scripts: [
13+
swiftLintScript
14+
],
1215
dependencies: [
13-
.core(),
16+
.core()
1417
]
1518
),
1619
Target.target(

src/Projects/BKPresentation/Project.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ let project = Project.project(
99
product: Project.product,
1010
bundleId: "presentation." + Project.bundleID,
1111
sources: .sources,
12+
scripts: [
13+
swiftLintScript
14+
],
1215
dependencies: [
1316
.core(),
1417
]

src/Projects/BKStorage/Project.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ let project = Project.project(
99
product: Project.product,
1010
bundleId: "storage." + Project.bundleID,
1111
sources: .sources,
12+
scripts: [
13+
swiftLintScript
14+
],
1215
dependencies: [
1316
.core(),
1417
]

src/Projects/Booket/Project.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ let appTarget = Target.target(
1313
// .glob(pattern: .relativeToRoot("src/Resources/LaunchScreen.storyboard"))
1414
],
1515
// entitlements: .file(path: .relativeToRoot("src/SupportingFiles/Booket.entitlements")),
16+
scripts: [
17+
swiftLintScript
18+
],
1619
dependencies: [
1720
// Module
1821
.data(),

0 commit comments

Comments
 (0)