-
Notifications
You must be signed in to change notification settings - Fork 0
🔀 :: (#49) setup detekt #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9fbe59c
:sparkles: :: detekt 적용
Hyeonseo4799 1d6e8eb
:memo: :: detekt ci 적용
Hyeonseo4799 26330b4
:wrench: :: convention.verify.detekt 적용
Hyeonseo4799 f0bd5db
:green_heart: :: 개행 추가
Hyeonseo4799 65db3a3
:green_heart: :: detekt에 잡힌 에러 수정
Hyeonseo4799 bdc6eda
:green_heart: :: build-logic에 testClasses 추가하는 코드 삭제
Hyeonseo4799 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
build-logic/src/main/kotlin/com/chat/build_logic/VerifyDetekt.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| package com.chat.build_logic | ||
|
|
||
| import org.gradle.api.Project | ||
| import org.gradle.kotlin.dsl.dependencies | ||
|
|
||
| internal fun Project.configureVerifyDetekt() { | ||
| with(pluginManager) { | ||
| apply("io.gitlab.arturbosch.detekt") | ||
| } | ||
|
|
||
| dependencies { | ||
| "detektPlugins"(libs.findLibrary("detekt.formatting").get()) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
build-logic/src/main/kotlin/convention.verify.detekt.gradle.kts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import com.chat.build_logic.configureVerifyDetekt | ||
| import io.gitlab.arturbosch.detekt.Detekt | ||
|
|
||
| configureVerifyDetekt() | ||
|
|
||
| tasks.withType<Detekt>().configureEach { | ||
| jvmTarget = "17" | ||
|
|
||
| buildUponDefaultConfig = true // 기본 설정에서 추가 설정만 덮어쓰기 | ||
| allRules = false // 모든 룰을 활성화 할지 설정 | ||
| parallel = true // 코드 분석 병렬 실행 설정 | ||
| config = files("$rootDir/config/detekt/detekt.yml") | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,124 @@ | ||
| build: | ||
| maxIssues: 0 | ||
|
|
||
| config: | ||
| validation: true | ||
| warningsAsErrors: true | ||
|
|
||
| complexity: | ||
| active: true | ||
| ComplexCondition: # 복잡한 조건 설정 | ||
| active: true | ||
| threshold: 5 | ||
| ComplexInterface: # 많은 함수 및 속성을 포함하는 인터페이스 | ||
| active: true | ||
| threshold: 10 | ||
| includeStaticDeclarations: false | ||
| includePrivateDeclarations: false | ||
| CyclomaticComplexMethod: # 독립적 경로의 수가 많은 복잡한 메서드 설정 | ||
| active: true | ||
| threshold: 50 | ||
| ignoreSingleWhenExpression: false # when 표현식 하나인 메서드 무시 | ||
| ignoreSimpleWhenEntries: false # 간단한 항목(중괄호 없음)을 무시 | ||
| ignoreNestingFunctions: false # if 나 for 문 대신 자주 사용되는 함수 무시 | ||
| nestingFunctions: | ||
| - 'also' | ||
| - 'apply' | ||
| - 'forEach' | ||
| - 'isNotNull' | ||
| - 'ifNull' | ||
| - 'let' | ||
| - 'run' | ||
| - 'use' | ||
| - 'with' | ||
| LargeClass: # 큰 클래스 크기 설정 | ||
| active: true | ||
| threshold: 500 | ||
| LongMethod: # 긴 메서드 크기 설정 | ||
| active: true | ||
| threshold: 400 | ||
| LongParameterList: # 특정 임계값보다 많은 매개변수가 있는 함수와 생성자 | ||
| active: true | ||
| functionThreshold: 20 | ||
| constructorThreshold: 7 | ||
| ignoreDefaultParameters: false # 기본값이 있는 매개변수 포함 | ||
| ignoreDataClasses: true # 데이터 클래스에 대해서 무시 | ||
| TooManyFunctions: | ||
| active: true | ||
| thresholdInFiles: 30 | ||
| thresholdInClasses: 20 | ||
| thresholdInInterfaces: 10 | ||
| thresholdInObjects: 20 | ||
| thresholdInEnums: 5 | ||
| ignoreDeprecated: true # @Deprecated 함수를 카운트에서 제외 | ||
| ignorePrivate: true # private 접근 제어자 함수를 카운트에서 제외 | ||
| ignoreOverridden: false # 오버라이드한 함수를 카운트에 포함 | ||
| NestedBlockDepth: # 중첩된 코드 블록 | ||
| active: true | ||
| threshold: 10 | ||
|
|
||
| coroutines: | ||
| active: true | ||
| GlobalCoroutineUsage: | ||
| active: false | ||
| RedundantSuspendModifier: | ||
| active: false | ||
| SleepInsteadOfDelay: | ||
| active: false | ||
| SuspendFunWithFlowReturnType: | ||
| active: false | ||
|
|
||
| empty-blocks: | ||
| active: true | ||
|
|
||
| exceptions: | ||
| active: true | ||
| InstanceOfCheckForException: # 예외 유형을 검사하는 catch 블록 | ||
| active: false | ||
| TooGenericExceptionThrown: # 너무 일반적인 유형의 Exception | ||
| active: false | ||
| exceptionNames: | ||
| - 'Error' | ||
| - 'Exception' | ||
| - 'RuntimeException' | ||
| - 'Throwable' | ||
|
|
||
| formatting: | ||
| active: true | ||
| ImportOrdering: | ||
| active: false | ||
| MaximumLineLength: | ||
| active: true | ||
| maxLineLength: 160 | ||
| ArgumentListWrapping: | ||
| active: false | ||
| Wrapping: | ||
| active: false | ||
| PackageName: | ||
| active: false | ||
|
|
||
| naming: | ||
| active: true | ||
| ConstructorParameterNaming: # 지정된 명명 규칙을 따르지 않는 생성자 매개변수 | ||
| active: false | ||
| FunctionNaming: # 지정된 명명 규칙을 따르지 않는 함수 이름 | ||
| active: false | ||
| BooleanPropertyNaming: | ||
| active: true | ||
| NonBooleanPropertyPrefixedWithIs: | ||
| active: true | ||
| PackageNaming: | ||
| active: false | ||
|
|
||
| performance: | ||
| active: true | ||
| ForEachOnRange: # 성능 비용이 발생하는 forEach 구문 | ||
| active: false | ||
| SpreadOperator: # 성능 저하 발생하는 spread 연산자 | ||
| active: false | ||
|
|
||
| potential-bugs: | ||
| active: true | ||
|
|
||
| style: | ||
| active: false | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,4 +41,4 @@ fun DetailAppbar( | |
| @Composable | ||
| fun DetailAppbarPreview() { | ||
| DetailAppbar() | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,4 +46,4 @@ fun GoSocketAppbarPreview() { | |
| ) { | ||
| Text(text = "GoSocketAppbar") | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,4 +74,4 @@ fun MainAppbar( | |
| @Composable | ||
| fun MainAppbarPreview() { | ||
| MainAppbar() | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,4 +96,4 @@ fun CreateMessageBottomSheetPreview() { | |
| Text(text = "Open") | ||
| } | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,4 +60,4 @@ fun GoSocketOutlinedButtonPreview() { | |
| text = "GoSocketOutlinedButton" | ||
| ) {} | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,4 +28,4 @@ fun InviteFriendButton( | |
| @Composable | ||
| fun InviteFriendButtonPreview() { | ||
| InviteFriendButton {} | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -107,4 +107,4 @@ fun GoSocketDialogPreview() { | |
| ) | ||
| Spacer(modifier = Modifier.height(30.dp)) | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,4 +61,4 @@ fun InviteDialog( | |
| @Composable | ||
| fun InviteDialogPreview() { | ||
| InviteDialog() | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,4 +41,4 @@ fun MessageTextField( | |
| @Composable | ||
| fun MessageTextFieldPreview() { | ||
| MessageTextField() | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,4 +54,4 @@ fun SearchTextField( | |
| @Composable | ||
| fun SearchTextFieldPreview() { | ||
| SearchTextField() | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.