Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 27 additions & 24 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,58 @@
# Mozi SwiftLint draft
# 기준: StyleShare 계열 가이드 + 현재 레포(SwiftUI/TCA)
# 상태: 초안. 세부 룰은 추후 조정 가능
# Mozi SwiftLint
# 기준: 안전성 우선 + SwiftUI/TCA/DesignSystem 실무 균형
# strict CI를 유지하되, 스타일 노이즈는 완화

disabled_rules:
# 초안 단계 노이즈 완화
# 포맷/스타일 노이즈
- trailing_whitespace
- todo
- multiple_closures_with_trailing_closure
- trailing_comma
- file_length
# 포맷터 없이 과도한 스타일 강제 완화
- opening_brace
- statement_position
- sorted_imports
- nesting

opt_in_rules:
# 안전성
- force_unwrapping
- implicitly_unwrapped_optional
- closure_spacing
- unowned_variable_capture
- weak_delegate
# 실용 품질
- private_over_fileprivate
- empty_enum_arguments
- weak_delegate
- first_where
- contains_over_filter_count
- contains_over_filter_is_empty
- overridden_super_call
- toggle_bool
- closure_body_length
- sorted_imports
- vertical_whitespace_closing_braces
- modifier_order
- redundant_nil_coalescing
- unused_import

# 안전성
force_unwrapping: error
implicitly_unwrapped_optional: error
force_cast: warning
force_try: warning

# 한 줄 길이: 초안 단계 노이즈 완화를 위해 상향
# 가독성: 너무 타이트하지 않게 완화
line_length:
warning: 120
error: 140
ignores_comments: true
ignores_urls: true

function_body_length:
warning: 60
error: 100
# --strict promotes warnings to errors, so warning is the practical gate
warning: 90
error: 120

type_body_length:
warning: 250
error: 350

file_length:
warning: 400
error: 600

# 테스트 코드의 짧은 타입명(OK 등) 허용을 위해 최소 길이 완화
type_name:
min_length:
Expand All @@ -67,14 +62,15 @@ type_name:
warning: 50
error: 60

# 테스트 코드의 짧은 식별자(a/b/c 등) 허용을 위해 최소 길이 완화
# 디자인 토큰 shade 이름(_50, _300)과 짧은 식별자 허용
identifier_name:
min_length:
warning: 1
error: 1
max_length:
warning: 50
error: 60
allowed_symbols: "_"
excluded:
- id
- x
Expand All @@ -86,11 +82,18 @@ identifier_name:
- to
- at
- vc

nesting:
type_level:
warning: 2
error: 3
- _0
- _50
- _100
- _200
- _300
- _400
- _500
- _600
- _700
- _800
- _900
- _1000

cyclomatic_complexity:
warning: 12
Expand Down
2 changes: 2 additions & 0 deletions Projects/App/Sources/DI/AppBootstrap.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import Foundation
import SharedDesignSystem
import SharedLogger
import ThirdParty

enum AppBootstrap {
@MainActor
static func run() {
_ = DesignSystemFontRegistration.registerIfNeeded()
let infra = InfraContainer.live()
prepareDependencies {
Dependencies.register(&$0, infra: infra)
Expand Down
3 changes: 2 additions & 1 deletion Projects/Shared/DesignSystem/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ let project = ProjectFactory.framework(
dependencies: [
.sharedUtils,
],
resources: ["Resources/**"]
resources: ["Resources/**"],
includesTests: true
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"images" : [
{
"filename" : "Apple.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"images" : [
{
"filename" : "Kakao.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import CoreGraphics

public extension CGFloat {
static let ds = DesignSystemMetrics()
}

public struct DesignSystemMetrics: Sendable {
public let radius = RadiusMetrics()
public let spacing = SpacingMetrics()
public let border = BorderMetrics()
public let controlHeight = ControlHeightMetrics()
public let dim = DimMetrics()

public init() {}
}

public struct RadiusMetrics: Sendable {
public let none = SemanticNumber.Radius.none
public let xsm = SemanticNumber.Radius.xsm
public let sm = SemanticNumber.Radius.sm
public let md = SemanticNumber.Radius.md
public let lg = SemanticNumber.Radius.lg
public let xxlg = SemanticNumber.Radius.xxlg
public let full = SemanticNumber.Radius.full

public init() {}
}

public struct SpacingMetrics: Sendable {
public let xs = SemanticNumber.Spacing.xs
public let sm = SemanticNumber.Spacing.sm
public let md = SemanticNumber.Spacing.md
public let lg = SemanticNumber.Spacing.lg
public let xl = SemanticNumber.Spacing.xl
public let xxl = SemanticNumber.Spacing.xxl

public init() {}
}

public struct BorderMetrics: Sendable {
public let thin = SemanticNumber.Border.thin
public let thick = SemanticNumber.Border.thick

public init() {}
}

public struct ControlHeightMetrics: Sendable {
public let sm = SemanticNumber.ControlHeight.sm
public let md = SemanticNumber.ControlHeight.md
public let lg = SemanticNumber.ControlHeight.lg

public init() {}
}

public struct DimMetrics: Sendable {
public let light = SemanticNumber.Dim.light
public let `default` = SemanticNumber.Dim.default
public let heavy = SemanticNumber.Dim.heavy

public init() {}
}
Loading