Skip to content

Code Convention

eunpyo hong edited this page Jul 14, 2024 · 2 revisions

최대 줄길이

  • 100자 이내

들여쓰기

image
  • 2 space

네이밍 규칙

약어를 지양하고 명확한 이름을 사용해요

UpperCamelCase

  • class
  • struct
  • enum
  • extension
  • protocol

lowerCamelCase

  • property
  • function
  • parameter

MARK

  • Mark 기준 위 아래는 빈줄

주요 섹션 구분 시(구분선 표시)

// MARK: - Message

func test() {

}

부 섹션이나 덜 중요한 섹션 구분 시(구분선 없이 표시)

// MARK: Message

func test() {

}

import

  • 알파벳 순으로 정렬
// UI 프레임워크
import SwiftUI

// 모듈
import Core
import DesignSystem

// 서드파티
import ComposableArchitecture
import Kingfisher
Clone this wiki locally