Skip to content

Commit

Permalink
[Refactor/#113] Ktlint 룰 추가: Trailing Comma 허용 (#203)
Browse files Browse the repository at this point in the history
* refactor: ktlint trailing comma 허용하도록 설정 변경

* refactor: ktlint trailing comma 허용 룰 적용

* refactor: ktlint trailing comma 허용 룰 적용(storage 모듈)
  • Loading branch information
hun-ca authored Jul 14, 2024
1 parent 0358450 commit 6973595
Show file tree
Hide file tree
Showing 186 changed files with 251 additions and 245 deletions.
4 changes: 3 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ insert_final_newline=true
disabled_rules=no-wildcard-imports,import-ordering,comment-spacing

[*.{kt,kts}]
insert_final_newline=false
insert_final_newline=false
# enable trailing_comma
ij_kotlin_allow_trailing_comma=true
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import org.springframework.stereotype.Repository

@Repository
class ArticleDao(
private val dslContext: DSLContext
private val dslContext: DSLContext,
) {
fun selectArticleRecord(query: SelectArticleRecordQuery): SelectArticleRecord? {
val articleId = query.articleId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ data class InsertFullArticleRecordCommand(
val mainImageURL: URL,
val title: String,
val category: Byte,
val content: String
val content: String,
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.few.api.repo.dao.article.query

data class SelectArticleRecordQuery(
val articleId: Long
val articleId: Long,
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package com.few.api.repo.dao.article.query

data class SelectWorkBookArticleRecordQuery(
val workbookId: Long,
val articleId: Long
val articleId: Long,
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.few.api.repo.dao.article.query

data class SelectWorkbookMappedArticleRecordsQuery(
val workbookId: Long
val workbookId: Long,
)
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ data class SelectArticleRecord(
val title: String,
val category: Byte,
val content: String,
val createdAt: LocalDateTime
val createdAt: LocalDateTime,
)
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ data class SelectWorkBookArticleRecord(
val category: Byte,
val content: String,
val createdAt: LocalDateTime,
val day: Long
val day: Long,
)
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ data class SelectWorkBookMappedArticleRecord(
val title: String,
val category: Byte,
val content: String,
val createdAt: LocalDateTime
val createdAt: LocalDateTime,
)
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.springframework.stereotype.Repository

@Repository
class DocumentDao(
private val dslContext: DSLContext
private val dslContext: DSLContext,
) {

fun insertDocumentIfo(command: InsertDocumentIfoCommand): Long? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ import java.net.URL
data class InsertDocumentIfoCommand(
val path: String,
val url: URL,
val alias: String = ""
val alias: String = "",
)
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.springframework.stereotype.Repository

@Repository
class ImageDao(
private val dslContext: DSLContext
private val dslContext: DSLContext,
) {

// todo test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ import java.net.URL
data class InsertImageIfoCommand(
val imagePath: String,
val url: URL,
val alias: String = ""
val alias: String = "",
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.springframework.stereotype.Repository

@Repository
class LogIfoDao(
private val dslContext: DSLContext
private val dslContext: DSLContext,
) {

fun insertLogIfo(command: InsertLogCommand): Long? {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.few.api.repo.dao.log.command

data class InsertLogCommand(
val history: String
val history: String,
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import org.springframework.stereotype.Repository

@Repository
class MemberDao(
private val dslContext: DSLContext
private val dslContext: DSLContext,
) {

fun selectWriter(query: SelectWriterQuery): WriterRecord? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import com.few.data.common.code.MemberType

data class InsertMemberCommand(
val email: String,
val memberType: MemberType
val memberType: MemberType,
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.few.api.repo.dao.member.query

data class SelectMemberByEmailQuery(
val email: String
val email: String,
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.few.api.repo.dao.member.query

data class SelectWriterQuery(
val writerId: Long
val writerId: Long,
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.few.api.repo.dao.member.query

data class SelectWritersQuery(
val writerIds: List<Long>
val writerIds: List<Long>,
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.few.api.repo.dao.member.record

data class MemberIdRecord(
val memberId: Long
val memberId: Long,
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ import java.net.URL
data class WriterRecord(
val writerId: Long,
val name: String,
val url: URL
val url: URL,
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import java.net.URL

data class WriterDescription(
val name: String,
val url: URL
val url: URL,
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.springframework.stereotype.Component

@Component
class WriterDescriptionJsonMapper(
private val objectMapper: ObjectMapper
private val objectMapper: ObjectMapper,
) {
init {
objectMapper.registerKotlinModule()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import org.springframework.stereotype.Component
@Component
class ProblemDao(
private val dslContext: DSLContext,
private val contentsJsonMapper: ContentsJsonMapper
private val contentsJsonMapper: ContentsJsonMapper,
) {
fun selectProblemContents(query: SelectProblemQuery): SelectProblemRecord? {
return dslContext.select(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.springframework.stereotype.Component

@Component
class SubmitHistoryDao(
private val dslContext: DSLContext
private val dslContext: DSLContext,
) {

fun insertSubmitHistory(command: InsertSubmitHistoryCommand): Long? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ data class InsertProblemsCommand(
val title: String,
val contents: Contents,
val answer: String,
val explanation: String
val explanation: String,
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ data class InsertSubmitHistoryCommand(
val problemId: Long,
val memberId: Long,
val submitAns: String,
val isSolved: Boolean
val isSolved: Boolean,
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.few.api.repo.dao.problem.query

data class SelectProblemAnswerQuery(
val problemId: Long
val problemId: Long,
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.few.api.repo.dao.problem.query

data class SelectProblemQuery(
val problemId: Long
val problemId: Long,
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.few.api.repo.dao.problem.query

data class SelectProblemsByArticleIdQuery(
val articleId: Long
val articleId: Long,
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.few.api.repo.dao.problem.record

data class ProblemIdsRecord(
val problemIds: List<Long>
val problemIds: List<Long>,
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package com.few.api.repo.dao.problem.record
data class SelectProblemAnswerRecord(
val id: Long,
val answer: String,
val explanation: String
val explanation: String,
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package com.few.api.repo.dao.problem.record
data class SelectProblemRecord(
val id: Long,
val title: String,
val contents: String
val contents: String,
)
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.few.api.repo.dao.problem.support

data class Contents(
val contents: List<Content>
val contents: List<Content>,
)

data class Content(
val number: Long,
val content: String
val content: String,
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.springframework.stereotype.Component

@Component
class ContentsJsonMapper(
private val objectMapper: ObjectMapper
private val objectMapper: ObjectMapper,
) {

fun toJson(contents: Contents): String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import java.time.LocalDateTime

@Component
class SubscriptionDao(
private val dslContext: DSLContext
private val dslContext: DSLContext,
) {

fun insertWorkbookSubscription(command: InsertWorkbookSubscriptionCommand) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package com.few.api.repo.dao.subscription.command

data class InsertWorkbookSubscriptionCommand(
val workbookId: Long,
val memberId: Long
val memberId: Long,
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package com.few.api.repo.dao.subscription.command

data class UpdateDeletedAtInAllSubscriptionCommand(
val memberId: Long,
val opinion: String
val opinion: String,
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package com.few.api.repo.dao.subscription.command
data class UpdateDeletedAtInWorkbookSubscriptionCommand(
val workbookId: Long,
val memberId: Long,
val opinion: String
val opinion: String,
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.few.api.repo.dao.subscription.query

data class CountWorkbookMappedArticlesQuery(
val workbookId: Long
val workbookId: Long,
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ package com.few.api.repo.dao.subscription.query
*/
data class SelectAllWorkbookSubscriptionStatusNotConsiderDeletedAtQuery(
val workbookId: Long,
val memberId: Long
val memberId: Long,
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package com.few.api.repo.dao.subscription.record

data class CountAllSubscriptionStatusRecord(
val totalSubscriptions: Long,
val activeSubscriptions: Long
val activeSubscriptions: Long,
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package com.few.api.repo.dao.subscription.record
data class WorkbookSubscriptionStatus(
val workbookId: Long,
val isActiveSub: Boolean,
val day: Int
val day: Int,
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.springframework.stereotype.Repository

@Repository
class WorkbookDao(
private val dslContext: DSLContext
private val dslContext: DSLContext,
) {
fun selectWorkBook(query: SelectWorkBookRecordQuery): SelectWorkBookRecord? {
return dslContext.select(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ data class InsertWorkBookCommand(
val title: String,
val mainImageUrl: URL,
val category: String,
val description: String
val description: String,
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package com.few.api.repo.dao.workbook.command
data class MapWorkBookToArticleCommand(
val workbookId: Long,
val articleId: Long,
val dayCol: Int
val dayCol: Int,
)
Loading

0 comments on commit 6973595

Please sign in to comment.