Skip to content

๐Ÿน์•„์š”์˜ ๋ˆˆ๋™์ž์— ๊ฑด๋ฐฐ-๐–ค๐Ÿฅ‚๐Ÿท

Notifications You must be signed in to change notification settings

TeamNobar/Nobar-iOS

Repository files navigation

Group 33781 copy ํŒ€์› ๋ณ„ ๋‹ด๋‹น๋ทฐ ์„ค๋ช…

Slide 16_9 - 7

ย ย ย ย ย 

๐Ÿท ๐Ÿท ๐Ÿท


๋„ค์ด๋ฐ

  • ํ•จ์ˆ˜ : lowerCamelCase ์‚ฌ์šฉํ•˜๊ณ  ๋™์‚ฌ๋กœ ์‹œ์ž‘
  • ๋ณ€์ˆ˜, ์ƒ์ˆ˜ : lowerCamelCase ์‚ฌ์šฉ
  • ํด๋ž˜์Šค : UpperCamelCase ์‚ฌ์šฉ

ํŒŒ์ผ๋ช…(์•ฝ์–ด์‚ฌ์šฉ)

  • ViewController โ†’ VC
  • TableViewCell โ†’ TVC
  • CollectionViewCell โ†’ CVC
  • ์ด ์™ธ์˜ ์ถ•์•ฝํ˜•์„ ์‚ฌ์šฉํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

๊ธฐํƒ€๊ทœ์น™

  • viewDidLoad()์—์„œ๋Š”ย ํ•จ์ˆ˜ํ˜ธ์ถœ๋งŒ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

  • ํ•จ์ˆ˜๋Š”ย extension์— ์ •์˜ํ•˜๊ณ  ์ •๋ฆฌํ•ฉ๋‹ˆ๋‹ค.

    • extension์€ ๋ชฉ์ ์— ๋”ฐ๋ผ ๋ถ„๋ฅ˜ํ•ฉ๋‹ˆ๋‹ค.

    • ์ˆœ์„œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

      final class A {
        private let dldld: String 
        private var sds: Bool { 
      
        }
      }
      
      // MARK: - Initialize
      extension A {
        init() {
      
        }
      
        func viewDidLoad() {
      
        }
      }
      
      // MARK: - Public functions
      extension A {
      
      }
      
      // MARK: - Private functions
      extension A {
      
      }
      
      // MARK: - ์–ด๋Š ํ•จ์ˆ˜๊ฐ€ ๋ชจ์—ฌ์žˆ์Šต๋‹ˆ๋‹ค
      extension A {
      
      }

Guides


โ–ถ๏ธ General Naming

  • API Design Guide์— ์„ค๋ช…๋œ Swift ๋ช…๋ช… ๊ทœ์น™์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
  • ๋ชจ๋“  ๋„ค์ด๋ฐ์€ ๊ทธ ๋‚ด์šฉ์„ ์ถฉ์‹คํžˆ ์„ค๋ช…ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ด๋ฆ„์„ ์ง“๊ธฐ ์–ด๋ ค์šด ๊ฒฝ์šฐ ์—ญํ• ์„ ๋” ๋ถ„๋ฆฌํ•ด ๋ณด์„ธ์š”.
  • Swift Type ์ด๋‹ˆ์…œ๋ผ์ด์ง• ๋˜๋Š” ํ”„๋กœํ† ์ฝœ์€ UpperCamelCase์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
  • ๊ทธ ์™ธ์—๋Š” lowerCamelCase๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

โ–ถ๏ธ ๋ธ๋ฆฌ๊ฒŒ์ดํŠธ(Delegates)

๋ธ๋ฆฌ๊ฒŒ์ดํŠธ ๋ฉ”์„œ๋“œ๋ฅผ ๋งŒ๋“ค ๋•Œ ์ด๋ฆ„์ด ์—†๋Š” ์ฒซ ๋ฒˆ์งธ ๋งค๊ฐœ๋ณ€์ˆ˜๋Š” ๋ธ๋ฆฌ๊ฒŒ์ดํŠธ ์ด๋ฆ„์ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

Preferred:

func namePickerView(_ namePickerView: NamePickerView, didSelected name: String)
func namePickerView(_ namePcikerView: NamePckerview, didChanged value: String)

Not - Preferred:

func didSelectName(namePicker: NamePickerViewController, name: String)
func namePickerShouldReload() -> Bool

โ–ถ๏ธย ํ•œ ์ค„ ์ตœ๋Œ€ ๊ธธ์ด

  • ํ•œ ์ค„์€ ์ตœ๋Œ€ 120์ž๋ฅผ ๋„˜์ง€ ์•Š๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.
  • Xcode์—์„œย Preferences -> Text Editing -> Display -> Page guide at column์„ 120๋กœ ์„ค์ •ํ•ด์„œ ์‚ฌ์šฉํ•ด์ฃผ์„ธ์š”.

โ–ถ๏ธย final ๊ทœ์น™

  • ๋”์ด์ƒ ์ƒ์†์ด ์ผ์–ด๋‚˜์ง€ ์•Š๋Š” class๋Š”ย final์„ ๋ช…์‹œํ•ฉ๋‹ˆ๋‹ค.
 final class AnyViewController: BaseViewController {
    ...
 }

โ–ถ๏ธย ์ ‘๊ทผ์ž ๊ทœ์น™

  • class ๋‚ด๋ถ€์—์„œ๋งŒ ์“ฐ์ด๋Š” ๋ณ€์ˆ˜๋Š”ย private์„ ๋ช…์‹œํ•ฉ๋‹ˆ๋‹ค.
  • fileprivate๋Š” ํ•„์š”ํ•œ ๊ฒฝ์šฐ๊ฐ€ ์•„๋‹ˆ๋ฉด ํ”ผํ•˜๊ณ ,ย private์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
  fianl class ChannelViewController {
    private var count = 0
    ...
  }

โ–ถ๏ธย ๋“ค์—ฌ์“ฐ๊ธฐ ๊ทœ์น™

  • Indent๋Š” 2์นธ์œผ๋กœ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.
  • Xcode์—์„œย Preferences -> Text Editing -> Display -> Line wrappingย ๋ถ€๋ถ„์„ 2 spaces๋กœ ์„ค์ •ํ•ด์„œ ์‚ฌ์šฉํ•ด์ฃผ์„ธ์š”.

โ–ถ๏ธ Extension ์‚ฌ์šฉ

ํ•œ extension๋‹น ํ•˜๋‚˜์˜ ํ”„๋กœํ† ์ฝœ ๋˜๋Š” ํด๋ž˜์Šค๋ฅผ ์ฑ„ํƒํ•˜๊ณ  ์ƒ์†ํ•˜๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.

class MyViewController:UIViewController {
  // class stuff here
}

// MARK: - UITableViewDataSource
extension MyViewController:UITableViewDataSource {
  // table view data source methods
}

// MARK: - UIScrollViewDelegate
extension MyViewController:UIScrollViewDelegate {
  // scroll view delegate methods
}

Not preferred:

class MyViewController: UIViewController, UITableViewDataSource, UIScrollViewDelegate {

โ–ถ๏ธย Imports๋ฅผ ์ตœ์†Œํ™”ํ•˜๊ธฐ(Minimal Imports)

ํ•„์š” ์—†๋Š” import๋Š” ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค. Swift Foundation๋„ ์ž‘์„ฑํ•˜์ง€ ์•Š์•„๋„ ๋œ๋‹ค๋ฉด ์ž‘์„ฑํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

โ–ถ๏ธ ์ฃผ์„

์ฃผ์„์„ ์‚ฌ์šฉํ•ด๋„ ์ข‹์Šต๋‹ˆ๋‹ค, ๋‹ค๋งŒ ๋‘๊ฐ€์ง€ ์กฐ๊ฑด์ด ์žˆ์Šต๋‹ˆ๋‹ค.

  • summary, quick help ๋“ฑ์€ ์‚ฌ์šฉํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
  • ์ฃผ์„์— ๋‚ ์งœ์™€ ์ž‘์„ฑ์ž๋ฅผ ์ ์Šต๋‹ˆ๋‹ค.
    • ์ž‘์„ฑํ•œ ์ฝ”๋“œ๊ฐ€ ํžˆ์Šคํ† ๋ฆฌ๊ฐ€ ๋˜์–ด์•ผ ํ•œ๋‹ค๋ฉด, // NOTE: - ์ฃผ์„์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
    • ๊ธฐํ•œ ๋‚ด์— ๋‹ค์‹œ ์ž‘์„ฑํ•  ์ฝ”๋“œ๋Š” // TODO: - ์ฃผ์„์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

๋กœ์ง์— ์ฃผ์„์ด ํ•„์š”ํ–ˆ๋‹ค๋ฉด ์ฝ”๋“œ๋งŒ์œผ๋กœ๋Š” ์„ค๋ช…์ด ์–ด๋ ต๋‹ค๋Š” ๋ฐฉ์ฆ์ž…๋‹ˆ๋‹ค. ์ด๋Ÿฐ ๊ฒฝ์šฐ๋Š” ๋กœ์ง์„ ํ•œ๋ฒˆ ๋˜๋Œ์•„ ๋ณด๋Š” ๊ฒƒ์„ ์ถ”์ฒœ๋“œ๋ ค์š”.

โ–ถ๏ธย ์ž„ํฌํŠธ

  • ๋ชจ๋“ˆ ์ž„ํฌํŠธ๋Š” ์•ŒํŒŒ๋ฒณ ์ˆœ์œผ๋กœ ์ •๋ ฌํ•ฉ๋‹ˆ๋‹ค.

  • ๋‚ด์žฅ ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ๋จผ์ € ์ž„ํฌํŠธํ•˜๊ณ , ๋นˆ ์ค„๋กœ ๊ตฌ๋ถ„ํ•˜์—ฌ ์„œ๋“œํŒŒํ‹ฐ ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ์ž„ํฌํŠธํ•ฉ๋‹ˆ๋‹ค.

    import UIKit
    
    import SwiftyColor
    import SwiftyImage
    import Then
    import URLNavigator

โ–ถ๏ธย  ์•ก์…˜ ํ•จ์ˆ˜ ๋„ค์ด๋ฐ

  • Action ํ•จ์ˆ˜์˜ ๋„ค์ด๋ฐ์€ '์ฃผ์–ด + ๋™์‚ฌ + ๋ชฉ์ ์–ด' ํ˜•ํƒœ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

    • Tap(๋ˆŒ๋ €๋‹ค ๋—Œ)*์€ย  .touchUpInside์— ๋Œ€์‘ํ•˜๊ณ ,
    • *Press(๋ˆ„๋ฆ„)*๋Š”ย  .touchDown์— ๋Œ€์‘ํ•ฉ๋‹ˆ๋‹ค.
    • will~์€ ํŠน์ • ํ–‰์œ„๊ฐ€ ์ผ์–ด๋‚˜๊ธฐ ์ง์ „์ด๊ณ ,ย did~๋Š” ํŠน์ • ํ–‰์œ„๊ฐ€ ์ผ์–ด๋‚œ ์งํ›„์ž…๋‹ˆ๋‹ค.
    • should~๋Š” ์ผ๋ฐ˜์ ์œผ๋กœย Bool์„ ๋ฐ˜ํ™˜ํ•˜๋Š” ํ•จ์ˆ˜์— ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.
    func didClickOnBackbutton() {
      // ...
    }

โ–ถ๏ธย Bool ๋ณ€์ˆ˜ ๋„ค์ด๋ฐ

  • ~์ธ์ง€ ์•„๋‹Œ์ง€์ธ ๊ฒฝ์šฐ is ex) isFirstResponder isMuted - is + ๋ช…์‚ฌ, is + ํ˜•์šฉ์‚ฌ
  • ~ํ•ด์•ผ๋งŒ ํ•˜๋Š” ๊ฒฝ์šฐ should ex) shouldHideOffline shouldShowDivider - ์กฐ๋™์‚ฌ + ๋™์‚ฌ ์›ํ˜•
  • ~ํ• ์ˆ˜ ์žˆ๋Š”์ง€์˜ ๊ฒฝ์šฐ can ex) canBecomeFirstResponder

โ–ถ๏ธย ์ƒ์ˆ˜ ์„ ์–ธ

  • ์ƒ์ˆ˜๋ฅผ ์ •์˜ํ•  ๋•Œ์—๋Š”ย enum๋ฅผ ๋งŒ๋“ค์–ด ๋น„์Šทํ•œ ์ƒ์ˆ˜๋ผ๋ฆฌ ๋ชจ์•„๋‘ก๋‹ˆ๋‹ค.

    ์žฌ์‚ฌ์šฉ์„ฑ๊ณผ ์œ ์ง€๋ณด์ˆ˜ ์ธก๋ฉด์—์„œ ํฐ ํ–ฅ์ƒ์„ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค.ย 

    structย ๋Œ€์‹ ย enum์„ ์‚ฌ์šฉํ•˜๋Š” ์ด์œ ๋Š”, ์ƒ์„ฑ์ž๊ฐ€ ์ œ๊ณต๋˜์ง€ ์•Š๋Š” ์ž๋ฃŒํ˜•์„ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ์ž…๋‹ˆ๋‹ค.

  • CGFloatLiteral์„ ์‚ฌ์šฉํ•ด์„œ ์ฝ”๋“œ๋ฅผ ๋‹จ์ˆœํ™”์‹œํ‚ต๋‹ˆ๋‹ค.

    final class ProfileViewController: UIViewController {
      private enum Metric {
        static let profileImageViewLeft = 10.f
        static let profileImageViewRight = 10.f
        static let nameLabelTopBottom = 8.f
        static let bioLabelTop = 6.f
      }
    
      private enum Font {
        static let nameLabel = UIFont.boldSystemFont(ofSize: 14)
        static let bioLabel = UIFont.boldSystemFont(ofSize: 12)
      }
    }

โ–ถ๏ธย self ์‚ฌ์šฉ ํ”ผํ•˜๊ธฐ

Swift๋Š” ๊ฐ์ฒด์˜ ํ”„๋กœํผํ‹ฐ์— ์ ‘๊ทผํ•˜๊ฑฐ๋‚˜ ๋ฉ”์„œ๋“œ ํ˜ธ์ถœํ•  ํ•„์š”๊ฐ€ ์—†๋Š” ๊ฒฝ์šฐ์—ย self๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š์•„๋„ ๋ฉ๋‹ˆ๋‹ค.

์ปดํŒŒ์ผ๋Ÿฌ์— ์˜ํ•ด ์š”๊ตฌ๋  ๋•Œ์—๋งŒ self๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.(@escaping ํด๋กœ์ €๋‚˜ ์ดˆ๊ธฐํ™”์—์„œ ์ธ์ž๊ฐ€ ํ”„๋กœํผํ‹ฐ์™€ ์• ๋งค๋ชจํ˜ธํ•  ๋•Œ).

โ–ถ๏ธย ๊ณ„์‚ฐ ํ”„๋กœํผํ‹ฐ(Computed Properties)

๊ฐ„๊ฒฐํ•จ์„ ์œ„ํ•ด ์ฝ๊ธฐ ์ „์šฉ์ธ ๊ฒฝ์šฐ get์„ ์ƒ๋žตํ•ฉ๋‹ˆ๋‹ค.

โ–ถ๏ธย ๋ฉ”์„œ๋“œ ์„ ์–ธ(Function Declarations)

ํ•˜๋‚˜์˜ ํŒŒ๋ผ๋ฏธํ„ฐ

func reticulateSplines(with spline: [Double]) -> Bool {
  // reticulate code goes here
}

ํ•˜๋‚˜ ์ด์ƒ์˜ ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ๊ฐ€์ง„ ๋ฉ”์„œ๋“œ

func reticulateSplines(
  with spline: [Double],
  adjustmentFactor: Double,
  translateConstant: Int, 
  comment: String
) -> Bool {
  // reticulate code goes here
}

โ–ถ๏ธย  ๋ฉ”์„œ๋“œ ํ˜ธ์ถœ(Function Call)

ํŒŒ๋ผ๋ฏธํ„ฐ๊ฐ€ ํ•œ ๊ฐœ์ผ ๋•Œ:

let success = reticulateSplines(with: splines)
let success = reticulateSplines(
  spline: splines,
  adjustmentFactor: 1.3,
  translateConstant: 2,
  comment: "normalize the display"
)

ํŒŒ๋ผ๋ฏธํ„ฐ๊ฐ€ ์—ฌ๋Ÿฌ๊ฐœ์ธ ๊ฒฝ์šฐ

โ–ถ๏ธย ๋นˆ ๋ฐฐ์—ด๊ณผ ๋นˆ ๋”•์…”๋„ˆ๋ฆฌ

๋นˆ ๋ฐฐ์—ด๊ณผ ๋นˆ ๋”•์…”๋„ˆ๋ฆฌ์˜ ๊ฒฝ์šฐ Type Annotation์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

Preferred:

var names: [String] = []
var lookup: [String: Int] = [:]

Not Preferred:

var names = [String]()
var lookup = [String: Int]()

โ–ถ๏ธย ๋ฉ”๋ชจ๋ฆฌ ๊ด€๋ฆฌ(Memory Management)

weak๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ˆœํ™˜ ์ฐธ์กฐ๋ฅผ ๋ฐฉ์ง€ํ•ฉ๋‹ˆ๋‹ค.

โ–ถ๏ธย ์‚ผํ•ญ ์—ฐ์‚ฐ์ž(Ternary Operator)

์‚ผํ•ญ ์—ฐ์‚ฐ์ž**(? : )**๋Š” ๋ช…ํ™•์„ฑ ๋˜๋Š” ์ฝ”๋“œ์˜ ๊น”๋”์„ฑ์„ ๋†’์ผ ๋•Œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

ํ•˜๋‚˜์˜ ์กฐ๊ฑด์„ ๊ณ„์‚ฐํ•˜๋Š” ๊ฒƒ์— ๋ณดํ†ต ์‚ฌ์šฉ๋˜๊ณ ,

๋ณต์ˆ˜์˜ ์กฐ๊ฑด์„ ๊ณ„์‚ฐํ•˜๋Š” ๊ฒƒ์€ ์ผ๋ฐ˜์ ์œผ๋กœ if ๋ฌธ์œผ๋กœ ์ดํ•ดํ•˜๊ฑฐ๋‚˜ ์ธ์Šคํ„ด์Šค ๋ณ€์ˆ˜๋กœ ๋ฆฌํŒฉํ„ฐ๋ง ํ•ฉ๋‹ˆ๋‹ค.

โ–ถ๏ธย ๊ด„ํ˜ธ(Parentheses)

์กฐ๊ฑด๋ฌธ ์ฃผ๋ณ€์˜ ๊ด„ํ˜ธ๋Š” ํ•„์š”ํ•˜์ง€ ์•Š์œผ๋ฏ€๋กœ ์ƒ๋žตํ•ฉ๋‹ˆ๋‹ค.

Preferred:

if name == "Hello" {
  print("World")
}

Not preferred:

if (name == "Hello") {
  print("World")
}


Slide 16_9 - 8

๐Ÿท ๐Ÿท ๐Ÿท

1.1. Rules

1.1.1. Git Flow

๊ธฐ๋ณธ์ ์œผ๋กœ Git Flow ์ „๋žต์„ ์ด์šฉํ•œ๋‹ค. ์ž‘์—… ์‹œ์ž‘ ์‹œ ์„ ํ–‰๋˜์–ด์•ผ ํ•  ์ž‘์—…์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

1. Issue๋ฅผ ์ƒ์„ฑํ•œ๋‹ค.
2. feature Branch๋ฅผ ์ƒ์„ฑํ•œ๋‹ค.
3. Add - Commit - Push - Pull Request ์˜ ๊ณผ์ •์„ ๊ฑฐ์นœ๋‹ค.
4. Pull Request๊ฐ€ ์ž‘์„ฑ๋˜๋ฉด ์ž‘์„ฑ์ž ์ด์™ธ์˜ ๋‹ค๋ฅธ ํŒ€์›์ด Code Review๋ฅผ ํ•œ๋‹ค.
5. Code Review๊ฐ€ ์™„๋ฃŒ๋˜๋ฉด Pull Request ์ž‘์„ฑ์ž๊ฐ€ develop Branch๋กœ merge ํ•œ๋‹ค.
6. ์ข…๋ฃŒ๋œ Issue์™€ Pull Request์˜ Label๊ณผ Project๋ฅผ ๊ด€๋ฆฌํ•œ๋‹ค.

1.1.2. Etc.

ํ˜‘์—… ์‹œ ์ค€์ˆ˜ํ•ด์•ผ ํ•  ๊ทœ์น™์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

1. develop์—์„œ์˜ ์ž‘์—…์€ ์›์น™์ ์œผ๋กœ ๊ธˆ์ง€ํ•œ๋‹ค. ๋‹จ, README ์ž‘์„ฑ์€ develop Branch์—์„œ ์ˆ˜ํ–‰ํ•œ๋‹ค.
2. ์ž์‹ ์ด ๋‹ด๋‹นํ•œ ๋ถ€๋ถ„ ์ด์™ธ์— ๋‹ค๋ฅธ ํŒ€์›์ด ๋‹ด๋‹นํ•œ ๋ถ€๋ถ„์„ ์ˆ˜์ •ํ•  ๋•Œ์—๋Š” Slack์„ ํ†ตํ•ด ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์ „๋‹ฌํ•œ๋‹ค.
3. ๋ณธ์ธ์˜ Pull Request๋Š” ๋ณธ์ธ์ด Mergeํ•œ๋‹ค.
4. ๋น ๋ฅธ ํ˜‘์—… ์†๋„๋ฅผ ์œ„ํ•ด Pull Request๊ฐ€ ์˜ฌ๋ผ์˜จ ์ดํ›„ 24์‹œ๊ฐ„ ๋‚ด์— Code Review๋ฅผ ์ˆ˜ํ–‰ํ•œ๋‹ค.
5. Commit, Push, Merge, Pull Request ๋“ฑ ๋ชจ๋“  ์ž‘์—…์€ ์•ฑ์ด ์ •์ƒ์ ์œผ๋กœ ์‹คํ–‰๋˜๋Š” ์ง€ ํ™•์ธ ํ›„ ์ˆ˜ํ–‰ํ•œ๋‹ค.
6. README ์ˆ˜์ •์„ ์œ„ํ•œ Commit ๋„๋ฐฐ๋Š” ๊ธˆ์ง€ํ•œ๋‹ค. ๋ฏธ๋ฆฌ๋ณด๊ธฐ๋Š” Preview๋ฅผ ํ†ตํ•ด ํ™•์ธํ•œ๋‹ค.

1.2. Branch

ํ˜‘์—… ์‹œ ์ค€์ˆ˜ํ•ด์•ผ ํ•  ๊ทœ์น™์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

๐Ÿ“Git Branch

Branch Naming Rule

Branch๋ฅผ ์ƒ์„ฑํ•˜๊ธฐ ์ „ Issue๋ฅผ ๋จผ์ € ์ž‘์„ฑํ•œ๋‹ค.

Issue ์ž‘์„ฑ ํ›„ ์ƒ์„ฑ๋˜๋Š” ๋ฒˆํ˜ธ์™€ Issue์˜ ๊ฐ„๋žตํ•œ ์„ค๋ช… ๋“ฑ์„ ์กฐํ•ฉํ•˜์—ฌ Branch์˜ ์ด๋ฆ„์„ ๊ฒฐ์ •ํ•œ๋‹ค.ย <Prefix>/<Issue_Number>-<Description>ย ์˜ ์–‘์‹์„ ๋”ฐ๋ฅธ๋‹ค.

  • mainย : ๊ฐœ๋ฐœ์ด ์™„๋ฃŒ๋œ ์‚ฐ์ถœ๋ฌผ์ด ์ €์žฅ๋  ๊ณต๊ฐ„
  • developย : feature ๋ธŒ๋žœ์น˜์—์„œ ๊ตฌํ˜„๋œ ๊ธฐ๋Šฅ๋“ค์ด merge๋  ๋ธŒ๋žœ์น˜
  • featureย : ๊ธฐ๋Šฅ์„ ๊ฐœ๋ฐœํ•˜๋Š” ๋ธŒ๋žœ์น˜, ์ด์Šˆ๋ณ„/์ž‘์—…๋ณ„๋กœ ๋ธŒ๋žœ์น˜๋ฅผ ์ƒ์„ฑํ•˜์—ฌ ๊ธฐ๋Šฅ์„ ๊ฐœ๋ฐœํ•œ๋‹ค
  • releaseย : ๋ฆด๋ฆฌ์ฆˆ๋ฅผ ์ค€๋น„ํ•˜๋Š” ๋ธŒ๋žœ์น˜, ๋ฆด๋ฆฌ์ฆˆ ์ง์ „ QA ๊ธฐ๊ฐ„์— ์‚ฌ์šฉํ•œ๋‹ค
  • bug : ๋ฒ„๊ทธ๋ฅผ ์ˆ˜์ •ํ•˜๋Š” ๋ธŒ๋žœ์น˜
  • hotfixย : ์ •๋ง ๊ธ‰ํ•˜๊ฒŒ, ๋ฐ๋ชจ๋ฐ์ด ์ง์ „์— ์—๋Ÿฌ๊ฐ€ ๋‚œ ๊ฒฝ์šฐ ์‚ฌ์šฉํ•˜๋Š” ๋ธŒ๋ Œ์น˜

์˜ˆ์‹œ

feature/#17-description์†Œ๋ฌธ์ž๋กœ๋งŒ์“ฐ๊ธฐ 

๐Ÿ“Commit Message

  • [HOTFIX] : issue๋‚˜, QA์—์„œ ๊ธ‰ํ•œ ๋ฒ„๊ทธ ์ˆ˜์ •์— ์‚ฌ์šฉ
  • [FIX] : ๋ฒ„๊ทธ, ์˜ค๋ฅ˜ ํ•ด๊ฒฐ
  • [ADD] : Feat ์ด์™ธ์˜ ๋ถ€์ˆ˜์ ์ธ ์ฝ”๋“œ ์ถ”๊ฐ€, ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ถ”๊ฐ€, ์ƒˆ๋กœ์šด ํŒŒ์ผ ์ƒ์„ฑ ์‹œ
  • [FEAT] : ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ๊ตฌํ˜„
  • [DEL] : ์“ธ๋ชจ์—†๋Š” ์ฝ”๋“œ ์‚ญ์ œ
  • [DOCS] : README๋‚˜ WIKI ๋“ฑ์˜ ๋ฌธ์„œ ๊ฐœ์ •
  • [MOD] : storyboard ํŒŒ์ผ,UI ์ˆ˜์ •ํ•œ ๊ฒฝ์šฐ
  • [CHORE] : ์ฝ”๋“œ ์ˆ˜์ •, ๋‚ด๋ถ€ ํŒŒ์ผ ์ˆ˜์ •
  • [CORRECT] : ์ฃผ๋กœ ๋ฌธ๋ฒ•์˜ ์˜ค๋ฅ˜๋‚˜ ํƒ€์ž…์˜ ๋ณ€๊ฒฝ, ์ด๋ฆ„ ๋ณ€๊ฒฝ ๋“ฑ์— ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
  • [MOVE] : ํ”„๋กœ์ ํŠธ ๋‚ด ํŒŒ์ผ์ด๋‚˜ ์ฝ”๋“œ์˜ ์ด๋™
  • [RENAME] : ํŒŒ์ผ ์ด๋ฆ„ ๋ณ€๊ฒฝ์ด ์žˆ์„ ๋•Œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
  • [IMPROVE] : ํ–ฅ์ƒ์ด ์žˆ์„ ๋•Œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
  • [REFACTOR] : ์ „๋ฉด ์ˆ˜์ •์ด ์žˆ์„ ๋•Œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค
  • [MERGE]: ๋‹ค๋ฅธ๋ธŒ๋ Œ์น˜๋ฅผ merge ํ•  ๋•Œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

์˜ˆ์‹œ

[FEAT] ๋ ˆ์ด์•„์›ƒ ๊ตฌํ˜„(#17)

๐Ÿ“PR Merge๋Š” 1 approve ๋ฐ›์€ ํ›„

๐Ÿ“ Code Review

๐Ÿพ ***๋‹ด๋‹น์ž๊ฐ€ ์ง€์ •๋˜๋ฉด โ€œ๋‚˜์ด๊ฑฐ ์–ธ์ œ๊นŒ์ง€ ํ•ด์ค„๊ฒŒ โ€œ๊นŒ์ง€๋Š” ์–˜๊ธฐํ•ด์ฃผ๊ธฐ!***

Reviewee

  • ๋ฆฌ๋ทฐ๋ฅผ ํ•ฉ๋ฆฌ์ , ์ค‘๋ฆฝ์ ์œผ๋กœ ๋ฐ›์•„๋“ค์—ฌ์•ผ ํ•จ (๋ฌด์กฐ๊ฑด ์‹ซ์–ด, ์ข‹์•„๋Š” ๊ณค๋ž€)
  • ๋ฐ˜์˜์ด ์–ด๋ ค์šฐ๋ฉด ์™œ ์–ด๋ ค์šด์ง€, ํ•ฉ๋ฆฌ์ ์ธ ์ด์œ ๋ฅผ ๋Œ€์•ผ ํ•จ
  • ํ”ผ๋“œ๋ฐฑ์€ ๋ฐ˜์˜ ํ•ด๋„ ๋˜๊ณ  ์•ˆํ•ด๋„๋จ but.์ฑ…์ž„์€ ๊ฒฐ์ •ํ•œ ์‚ฌ๋žŒ์ด ์ง„๋‹ค.
  • ๋ฐ˜์˜ํ•˜์ง€ ์•Š๋Š” ๊ฒƒ์— ๋Œ€ํ•œ๊ฒƒ์€ ํ•ฉ๋‹นํ•œ ์ด์œ ๊ฐ€ ๋ฐ˜๋“œ์‹œ ์กด์žฌํ•˜์—ฌ์•ผ ํ•จ.

Reviewer

  • ์˜จํ™”ํ•œ ๋‰˜์•™์Šคโค๏ธ๐Ÿค
  • ์œ ํšจํ•œ ๋ฆฌ๋ทฐ๊ฐ€ ๋  ์ˆ˜ ์žˆ๋„๋ก ์—ผ๋‘์— ๋‘๊ณ  ๋ฆฌ๋ทฐ
    • ์œ ํšจํ•œ ๋ฆฌ๋ทฐ๋ž€?
      1. ๋‚ ์นด๋กœ์šด(?) ์งˆ๋ฌธ - ์ŠคํŽ™์— ๋Œ€ํ•œ ํ™•์ธ, ์ž‘์„ฑ์ž์˜ ์˜๋„ ํ™•์ธ
      2. ์˜ค๋ฅ˜ ์ง€์ 
      3. ์˜คํƒ€, ๋ถ€์ ์ ˆํ•œ ๋„ค์ด๋ฐ
      4. ์ŠคํŽ™์— ๋Œ€ํ•œ ์ž˜๋ชป๋œ ์ดํ•ด (ํ•ด๋‹น ์ŠคํŽ™์— ๋Œ€ํ•œ Domain Knowledge ํ•„์š”)
      5. ๋‹ค๋ฅธ ๋ชจ๋“ˆ๋กœ์˜ ์˜ํ–ฅ์„ฑ ์ง€์ 
      6. ๋ณด๋‹ค ๋‚˜์€ ์„ฑ๋Šฅ, ๊ตฌ์กฐ์˜ ๋Œ€์•ˆ ์ œ์‹œ
      7. ์ž๋ฃŒ ๊ตฌ์กฐ, ์ฒ˜๋ฆฌ ๋ฐฉ์‹ (๋™๊ธฐ/๋น„๋™๊ธฐ ๋“ฑ) ๋ณ„๋„์˜ ํˆด ์ œ์•ˆ
      8. ๋‘๋ฃจ๋ญ‰์ˆ ํ•œ๊ฒƒ ๋ณด๋‹ค๋Š” ์ฝ”๋“œ example์„ ์ฃผ๋Š” ๊ฒƒ์ด ์ข‹์Œ


Group 33781 2

About

๐Ÿน์•„์š”์˜ ๋ˆˆ๋™์ž์— ๊ฑด๋ฐฐ-๐–ค๐Ÿฅ‚๐Ÿท

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages