Skip to content

Commit 6f3a542

Browse files
committed
Analysis: Enable ignore default parameters for the long param list rule
Updating this rule to align WPAndroid with WCAndroid in terms of Detekt rules. As part of updating this rule you will notice that all such baseline rules got removed and either added explicitly, inline/close to source or just deleted since they are no longer necessary. Thus, you will notice some new suppress annotations that got added as part of this commit. But, all those warnings are being added because they got moved from the baseline and not because they are new.
1 parent 6a58246 commit 6f3a542

69 files changed

Lines changed: 69 additions & 109 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

WordPress/src/main/java/org/wordpress/android/support/ZendeskHelper.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ class ZendeskHelper(
336336
/**
337337
* This is a helper function which builds a `UiConfig` through helpers to be used during ticket creation.
338338
*/
339-
@Suppress("LongParameterList")
340339
private fun buildZendeskConfig(
341340
context: Context,
342341
allSites: List<SiteModel>?,

WordPress/src/main/java/org/wordpress/android/ui/deeplinks/handlers/DeepLinkHandlers.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import org.wordpress.android.util.UriWrapper
77
import org.wordpress.android.viewmodel.Event
88
import javax.inject.Inject
99

10-
@Suppress("LongParameterList")
1110
class DeepLinkHandlers
1211
@Inject constructor(
1312
editorLinkHandler: EditorLinkHandler,

WordPress/src/main/java/org/wordpress/android/ui/jetpack/backup/download/builders/BackupDownloadStateListItemBuilder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ class BackupDownloadStateListItemBuilder @Inject constructor(
199199
}
200200
)
201201

202-
@Suppress("LongMethod", "LongParameterList")
202+
@Suppress("LongMethod")
203203
private fun buildActionButtonState(
204204
@StringRes titleRes: Int,
205205
@StringRes contentDescRes: Int,

WordPress/src/main/java/org/wordpress/android/ui/layoutpicker/LayoutsRowViewHolder.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class LayoutsFooterViewHolder(parent: ViewGroup, footerLayoutResId: Int) :
2626
/**
2727
* Modal Layout Picker layouts view holder
2828
*/
29-
@Suppress("LongParameterList")
3029
class LayoutsItemViewHolder(
3130
parent: ViewGroup,
3231
private val prefetchItemCount: Int = 4,

WordPress/src/main/java/org/wordpress/android/ui/mediapicker/MediaThumbnailViewUtils.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class MediaThumbnailViewUtils(val imageManager: ImageManager) {
4444
displaySelection(animateSelection, isSelected, imgThumbnail)
4545
}
4646

47+
@Suppress("LongParameterList")
4748
fun setupFileImageView(
4849
container: View,
4950
imgThumbnail: ImageView,

WordPress/src/main/java/org/wordpress/android/ui/mediapicker/insert/GifMediaInsertUseCase.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import org.wordpress.android.util.WPMediaUtilsWrapper
2626
import javax.inject.Inject
2727
import javax.inject.Named
2828

29+
@Suppress("LongParameterList")
2930
class GifMediaInsertUseCase(
3031
private val context: Context,
3132
private val site: SiteModel,

WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ import java.util.Date
125125
import javax.inject.Inject
126126
import javax.inject.Named
127127

128-
@Suppress("LargeClass", "LongMethod", "LongParameterList", "TooManyFunctions")
128+
@Suppress("LargeClass", "LongMethod", "TooManyFunctions")
129129
class MySiteViewModel @Inject constructor(
130130
private val networkUtilsWrapper: NetworkUtilsWrapper,
131131
@param:Named(UI_THREAD) private val mainDispatcher: CoroutineDispatcher,

WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/CardsBuilder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import org.wordpress.android.util.BuildConfigWrapper
1717
import org.wordpress.android.util.config.QuickStartDynamicCardsFeatureConfig
1818
import javax.inject.Inject
1919

20-
@Suppress("LongParameterList")
2120
class CardsBuilder @Inject constructor(
2221
private val buildConfigWrapper: BuildConfigWrapper,
2322
private val quickStartDynamicCardsFeatureConfig: QuickStartDynamicCardsFeatureConfig,
@@ -27,6 +26,7 @@ class CardsBuilder @Inject constructor(
2726
private val dashboardCardsBuilder: CardsBuilder,
2827
private val mySiteDefaultTabExperiment: MySiteDefaultTabExperiment
2928
) {
29+
@Suppress("LongParameterList")
3030
fun build(
3131
quickActionsCardBuilderParams: QuickActionsCardBuilderParams,
3232
domainRegistrationCardBuilderParams: DomainRegistrationCardBuilderParams,

WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/quickstart/QuickStartRepository.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ import javax.inject.Named
5959
import javax.inject.Singleton
6060
import kotlin.coroutines.CoroutineContext
6161

62-
@Suppress("LongParameterList", "TooManyFunctions")
62+
@Suppress("TooManyFunctions")
6363
@Singleton
6464
class QuickStartRepository
6565
@Inject constructor(

WordPress/src/main/java/org/wordpress/android/ui/notifications/NotificationsListFragment.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,9 @@ class NotificationsListFragment : Fragment(R.layout.notifications_list_fragment)
269269
return detailIntent
270270
}
271271

272-
@JvmStatic fun openNoteForReply(
272+
@JvmStatic
273+
@Suppress("LongParameterList")
274+
fun openNoteForReply(
273275
activity: Activity?,
274276
noteId: String?,
275277
shouldShowKeyboard: Boolean,

0 commit comments

Comments
 (0)