Skip to content

Commit

Permalink
Added more complexity rules
Browse files Browse the repository at this point in the history
  • Loading branch information
imashnake0 committed Jan 21, 2024
1 parent 55328e5 commit 33d2ce3
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import javax.inject.Inject
* @property fetchMediaList Fetches a list of [MediaListQuery.Medium].
* @property fetchMedia Fetches detailed media: [MediaQuery.Media].
*/
@Suppress("detekt:LongParameterList")
class AnilistMediaRepository @Inject constructor(
private val apolloClient: ApolloClient
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import com.imashnake.animite.core.ui.LocalPaddings

@Destination
@Composable
@Suppress("detekt:LongMethod")
fun Home(
viewModel: HomeViewModel = hiltViewModel(),
navigator: DestinationsNavigator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ import com.ramcosta.composedestinations.annotation.Destination

@Destination(navArgsDelegate = MediaPageArgs::class)
@Composable
@Suppress("detekt:CognitiveComplexMethod")
@Suppress(
"detekt:CognitiveComplexMethod",
"detekt:LongMethod"
)
fun MediaPage(
viewModel: MediaPageViewModel = hiltViewModel()
) {
Expand Down
24 changes: 24 additions & 0 deletions config/detekt/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,30 @@ comments:
complexity:
CognitiveComplexMethod:
active: true
ComplexCondition:
active: true
ComplexInterface:
active: true
LargeClass:
active: true
LongMethod:
active: true
LongParameterList:
active: true
MethodOverloading:
active: true
NamedArguments:
active: true
NestedBlockDepth:
active: true
NestedScopeFunctions:
active: true
ReplaceSafeCallChainWithRun:
active: true
StringLiteralDuplication:
active: true
TooManyFunctions:
active: true

style:
UnusedImports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.Dp

@Composable
@Suppress("detekt:LongParameterList")
fun TranslucentStatusBarLayout(
scrollState: ScrollState,
distanceUntilAnimated: Dp,
Expand Down

0 comments on commit 33d2ce3

Please sign in to comment.