-
Notifications
You must be signed in to change notification settings - Fork 5
๐ ์ฝํ๋ฆฐ ์ปจ๋ฒค์
๋ฐ์ฐฌํธ edited this page Nov 22, 2022
·
8 revisions
https://github.com/JLLeitschuh/ktlint-gradle ์ฌ์ฉ
root = true
[*]
charset=utf-8
end_of_line=lf
indent_style=space
indent_size=4
insert_final_newline=false
[*.{kt,kts}]
disabled_rules=no-wildcard-imports,import-ordering,comment-spacing,no-blank-line-before-rbrace
-
./gradlew ktlintCheck
- ๋ชจ๋ ์ฝํ๋ฆฐ ํ์ผ๋ค ์ฒดํฌ -
./gradlew ktlintFormat
- ๋ชจ๋ ์ฝํ๋ฆฐ ํ์ผ๋ค ์ฝ๋ ์คํ์ผ์ ๋ง๊ฒ ์์ -
./gradlew addKtlintCheckGitPreCommitHook
- staged file๋ค check -
./gradlew addKtlintFormatGitPreCommitHook
- staged file๋ค format -
rm .git/hooks/pre-commit
- git hook ์ ๊ฑฐ(๋ง์ฝ ๋ค๋ฅธ git hookํ๊ฑฐ์์ผ๋ฉด ๊ฐ์ด ์์ด์ง๋ฏํจ)
val addTaskViewModel: AddTaskViewModel by viewModels()
val addTaskAdapter = AddTaskAdapter()
- ํ๋กํผํฐ
- ์์ฑ์
- init
- override ํจ์ (lifecycle ๋ฑ)
- public ํจ์
- private ํจ์
- ๋ค๋ฅธ class, interface, enum, data class
- companion object
interface Example {
//๊ฐํ
fun A()
fun B()
fun C()
//๊ฐํ
}
class Sample() : Example {
//๊ฐํ
private val binding
fun function()
companion object {
}
//๊ฐํ
}
- ํด๋์ค, ์ธํฐํ์ด์ค ๋ด ๋งจ ์์ ์๋๋ ํ ์ค์ฉ ๋์ด๋ค.
- ํ๋กํผํฐ๋ ๋ถ์ฌ์ฐ๋, ์ข ๋ฅ๊ฐ ๋ง์์ง๋ฉด ๊ฐํ์ผ๋ก ๊ตฌ๋ถํ๋ค.
enum class ProductType {
}
[What]Type
- apply, also, with, let, run
- Scope ํจ์ 3๊ฐ ์ด์ ์ค์ฒฉ ์ง์
- Scope ํจ์ ์ค์ฒฉ ์ it ์ง์
- resource -> ํ๋ฉด์ ๋ณด์ด๋๊ฐ๋ฅผ ๊ธฐ์ค์ผ๋ก string.xml์ ๋ถ๋ฆฌ ๊ฒฐ์ Android intent extra name์ companion์ const val ์ ์ธ
- ex: EXTRA_TITLE_ID = "title_id" ์์ ๋ค์ด๋ฐ์ upper snake case
- ์๋ฏธ ์๋ ์ซ์, ๋ฌธ์์ด์ companion์ const val ์ ์ธ
- ex: LOOP_COUNT = 10
<์๋ฃํ>.to[์๋ฃํ]()
fun ProductResoponseBody.toProduct() = Product()
- [DATA]repository: <type>responsebody/entity <-> <type>
- [VIEW]viewmodel, view : <type> <-> <type>UiState
//repository..
fun <type>ResoponseBody.to<type>() = <type>()
fun <type>.to<type>ResoponseBody() = <type>ResoponseBody()
fun <type>Entity.to<type>() = <type>()
fun <type>.to<type>Entity() = <type>Entity()
//viewmodel or view..
fun <type>UiState.to<type>() = <type>()
fun <type>.to<type>UiState() = <type>UiState()
<ํ ์คํธ ์ด๋ฆ>_<์ผ์ด์ค ์ด๋ฆ>
fun signUp_DuplicateID()
- //comment
//comment
- Naver Maps API ์ฌ์ฉ๊ธฐ
- AlarmManager
- FCM ์ฌ์ฉ๊ธฐ
- Location API ์ ํํ๊ธฐ
- Activity์ Service ์ํธ์์ฉํ๊ธฐ
- ์์ธํ๋ฉด ViewModel ๋ฆฌํํ ๋ง
- Flow๋ ์ฒ์์ด์ง?
- Dialog ์ปค์คํ ํด๋ณด๊ธฐ
- Unit Test๋ฅผ ํด๋ณด์
- RecyclerView๊ฐ ์ ์ ๋ฐ์ดํธ๋์ง ์์๊น?
- ์์น ๊ณต์ ๋ฅผ ์ธ์ ์์ํ๊ณ ์ข ๋ฃํ ์ ์๋๋ก ํ ๊น?
- ์น๊ตฌ ๊ธฐ๋ฅ, ์ด๋๋ก ๊ด์ฐฎ์๊ฐ
- ๋ค๋ฅธ ํ๊ณผ QA ํด๋ณธ ํ๊ธฐ
- ์ฐ๋ฆฌ ์ด์ ๋ญํ์ง?