Skip to content

Commit

Permalink
Adds ignore for suppresses for CyclomaticComplexMethod specific cases…
Browse files Browse the repository at this point in the history
… now caught on detekt with detekt/detekt#5442
  • Loading branch information
antonis committed Jul 18, 2023
1 parent b34cd8e commit c9e2b81
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
Expand Up @@ -276,6 +276,7 @@ class WPEditTextWithChipsOutlined @JvmOverloads constructor(
)
}

@SuppressWarnings("CyclomaticComplexMethod")
private fun setListeners() {
editor.setOnFocusChangeListener { _, hasFocus ->
val canAnimate = hint.width > 0 && label.width > 0 && hint.height > 0 && label.height > 0
Expand Down
Expand Up @@ -16,6 +16,7 @@ import javax.inject.Inject

class UiModelMapper
@Inject constructor(private val networkUtilsWrapper: NetworkUtilsWrapper) {
@SuppressWarnings("CyclomaticComplexMethod")
fun mapInsights(
useCaseModels: List<UseCaseModel>,
showError: (Int) -> Unit
Expand Down Expand Up @@ -89,6 +90,7 @@ class UiModelMapper
return mapStatsWithOverview(TimeStatsType.OVERVIEW, useCaseModels, showError)
}

@SuppressWarnings("CyclomaticComplexMethod")
private fun mapStatsWithOverview(
overViewType: StatsType,
useCaseModels: List<UseCaseModel>,
Expand Down
Expand Up @@ -110,6 +110,7 @@ class ReferrersUseCase(
}
}

@SuppressWarnings("CyclomaticComplexMethod")
override fun buildUiModel(domainModel: ReferrersModel, uiState: SelectedGroup): List<BlockListItem> {
val items = mutableListOf<BlockListItem>()

Expand Down
Expand Up @@ -73,6 +73,7 @@ class BarChartViewHolder(parent: ViewGroup) : BlockListItemViewHolder(
}
}

@SuppressWarnings("CyclomaticComplexMethod")
private fun BarChart.draw(
item: BarChartItem,
labelStart: TextView,
Expand Down

0 comments on commit c9e2b81

Please sign in to comment.