Skip to content

Commit

Permalink
Added CognitiveComplexMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
imashnake0 committed Jan 21, 2024
1 parent 5e81352 commit 55328e5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/imashnake/animite/dev/ext/Month.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import java.time.Month
*
* ]
*/
val seasons = with(Month.values()) {
val seasons = with(Month.entries) {
drop(2) + take(2)
}.chunked(3)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ fun HomeRow(
}

@Composable
@Suppress("detekt:CognitiveComplexMethod")
private fun MediaTypeSelector(
modifier: Modifier = Modifier,
selectedOption: MutableState<MediaType>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ import com.ramcosta.composedestinations.annotation.Destination

@Destination(navArgsDelegate = MediaPageArgs::class)
@Composable
@Suppress("detekt:CognitiveComplexMethod")
fun MediaPage(
viewModel: MediaPageViewModel = hiltViewModel()
) {
Expand Down
8 changes: 8 additions & 0 deletions config/detekt/detekt.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
comments:
EndOfSentenceFormat:
active: true

complexity:
CognitiveComplexMethod:
active: true

style:
UnusedImports:
active: true
Expand Down
1 change: 0 additions & 1 deletion material-color-utilities/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin)
alias(libs.plugins.detekt)
}

android {
Expand Down

0 comments on commit 55328e5

Please sign in to comment.