Skip to content

๐Ÿฃ moabam backend

ํ™ํ˜์ค€ edited this page Nov 1, 2023 · 11 revisions

ํ”„๋กœ์ ํŠธ ์ดˆ๊ธฐ ์„ธํŒ…๋ฐฉ๋ฒ•

checkstyle

  1. Settings โ†’ Editor โ†’ Code Style โ†’ ...(์  3๊ฐœ) ํ˜น์€ ํ†ฑ๋‹ˆ๋ฐ”ํ€ด ํด๋ฆญ โ†’ import style โ†’ import scheme โ†’ IntelliJ code style XML โ†’ ํ”„๋กœ์ ํŠธ ๊ฒฝ๋กœ /config/naver-intellij-formatter-custom.xml ์„ ํƒ

  2. Settings โ†’ Tools โ†’ Actions on Save โ†’ Reformat code ์ฒดํฌ

    • ์ด์Šˆ : ์ €์žฅํ•ด๋„ ๋ฆฌํฌ๋งท ์•ˆ๋˜๋Š” ๊ฒฝ์šฐ
    • ํ•ด๊ฒฐ : ๋นˆ ์ค„์— ์—”ํ„ฐ ์ž…๋ ฅ -> ์ €์žฅ -> ์—”ํ„ฐ ์‚ญ์ œ -> ์ €์žฅ
  3. Settings โ†’ Editor โ†’ General โ†’ Auto Import โ†’ Java -> Optimize imports on the fly ์ฒดํฌ

  4. Settings โ†’ Plugins โ†’ Marketplace -> CheckStyle-Idea ์„ค์น˜

    • Settings โ†’ Tools โ†’ Checkstyle -> Configuration File -> ํ”Œ๋Ÿฌ์Šค ๋ชจ์–‘ ํด๋ฆญ -> ์ด๋ฆ„ : naver-custom-checkstyle ์ž…๋ ฅ -> Use a Local Checkstyle File -> /config/checkstyle/checkstyle.xml -> Next ํด๋ฆญ -> suppressionFile์˜ Value ๋นˆ์นธ ํด๋ฆญ -> config/checkstyle/suppressions.xml ์ž…๋ ฅ -> finish ํด๋ฆญ -> ์ƒ์„ฑ๋œ ๊ฒƒ ์ฒดํฌ(ํ™œ์„ฑํ™”) -> Apply ํด๋ฆญ
    • ์ขŒ์ธก ํ•˜๋‹จ ์—ฐํ•„ ๋ชจ์–‘ ํด๋ฆญ ์‹œ, ์„ค์ •ํ•œ chechkstyle์—์„œ ์œ„๋ฐฐ ํ™•์ธ ๊ฐ€๋Šฅ ๋˜ํ•œ warning์— ๋งˆ์šฐ์Šค ์˜ฌ๋ฆด ์‹œ ๊ฒฝ๊ณ  ์›์ธ ํ™•์ธ ๊ฐ€๋Šฅ

์ฃผ์˜ํ•  ์ 

  • ์œ„ ๊ณผ์ •์„ ๋”ฐ๋ฅด๋ฉด ์ €์žฅ ์‹œ, ๋Œ€๋ถ€๋ถ„ ์ปจ๋ฒค์…˜์— ๋งž๊ฒŒ ์ˆ˜์ • ๊ฐ€๋Šฅ. ๋‹จ, Enum.java ๋ฐ‘ ๊ณต๋ฐฑ์€ ๋ฏธ์ ์šฉ. ์ฆ‰, ์ง์ ‘ ์ˆ˜์ •ํ•ด์•ผ ํ•œ๋‹ค.
  • ์•ž์œผ๋กœ ์ปค๋ฐ‹ ๋ฐ ํ‘ธ์‰ฌ ์ „ gradle์—์„œ clean ๋ฐ buildํ•˜๊ธฐ.
  • ์ปจ๋ฒค์…˜ ํ‹€๋ ค๋„ ๋นŒ๋“œ ์‹คํŒจํ•˜๋‹ˆ, ์ฐธ๊ณ 

config ํŒŒ์ผ ๊ด€๋ฆฌ

์ตœ์ดˆ clone ํ•˜๋Š” ๊ฒฝ์šฐ

  • git clone https://github.com/team-moabam/moabam-BE.git
  • git submodule init
  • git submodule update

config ํŒŒ์ผ ์—…๋ฐ์ดํŠธ ๋œ ๊ฒฝ์šฐ

  • git submodule update --merge --remote

์ฃผ์˜์‚ฌํ•ญ

  • ํ‰์ƒ์‹œ
    • config ํŒŒ์ผ์€ ์ˆ˜์ •ํ•œ ๋ณธ์ธ์ด ์•„๋‹ ์‹œ, ์ปค๋ฐ‹ ์ฒดํฌ์—์„œ ๋ฌด์กฐ๊ฑด ๋นผ๋Š” ๊ฒƒ ๊ถŒ์žฅ
    • ๋งŒ์•ฝ, ์ปค๋ฐ‹์„ ํ–ˆ๋‹ค๋ฉด ์–ด์ฐจํ”ผ PR ๋ชปํ•˜๊ฒŒ ๋ฒ„ํŠผ ์‚ฌ๋ผ์ง€๋„๋ก ํ•˜์˜€์Œ. ์ฆ‰ ์ทจ์†Œ ํ›„ ํ•ด๋‹น ์ปค๋ฐ‹ ์‚ญ์ œ
  • s3 ๋ฒ„ํ‚ท ์ฃผ์†Œ ๋ณ€๊ฒฝ๊ณผ ๊ฐ™์€ ์ƒํ™ฉ. ์ฆ‰, ๋ฐ˜๋“œ์‹œ ๋ฐ”๋€ config๋ฅผ ์ ์šฉํ•ด์•ผ ํ•˜๋Š” ์ƒํ™ฉ
    • config ์ˆ˜์ •ํ•œ ์‚ฌ๋žŒ์ด ๋น ๋ฅด๊ฒŒ dev์— push
    • feature์—์„œ ์ž‘์—…์ค‘์ธ ์‚ฌ๋žŒ์€ feature ์ „๋ถ€ stash -> develop pull -> feature์— merge -> pop stash

์˜ˆ์‹œ์ƒํ™ฉ

  • A๊ฐ€ config ํŒŒ์ผ ์ˆ˜์ •
    • ๋ชจ๋“  ํŒ€์›์€ git submodule update --merge --remote