Commit 61d6b333 authored by Tiger Oakes's avatar Tiger Oakes Committed by Emily Kager
Browse files

Update LongParameterList baseline

parent eab96601
......@@ -10,7 +10,6 @@ import org.mozilla.fenix.home.Tab
/**
* Diff callback for comparing tab lists with selected state.
*/
@Suppress("LongParameterList")
internal class TabDiffUtil(
private val old: List<Tab>,
private val new: List<Tab>,
......
......@@ -47,6 +47,7 @@ import org.mozilla.fenix.utils.Settings
* background worker.
*/
@Mockable
@Suppress("LongParameterList")
class BackgroundServices(
private val context: Context,
private val push: Push,
......
......@@ -25,6 +25,7 @@ import org.mozilla.fenix.utils.Mockable
* Component group for miscellaneous components.
*/
@Mockable
@Suppress("LongParameterList")
class IntentProcessors(
private val context: Context,
private val sessionManager: SessionManager,
......
......@@ -27,6 +27,7 @@ import org.mozilla.fenix.utils.Mockable
* modules and can be triggered by UI interactions.
*/
@Mockable
@Suppress("LongParameterList")
class UseCases(
private val context: Context,
private val engine: Engine,
......
......@@ -42,7 +42,7 @@ import org.mozilla.fenix.theme.ThemeManager
* @param lifecycleOwner View lifecycle owner used to determine when to cancel UI jobs.
* @param bookmarksStorage Used to check if a page is bookmarked.
*/
@Suppress("LargeClass")
@Suppress("LargeClass", "LongParameterList")
class DefaultToolbarMenu(
private val context: Context,
private val sessionManager: SessionManager,
......
......@@ -68,7 +68,6 @@ abstract class ToolbarIntegration(
}
}
@Suppress("LongParameterList")
class DefaultToolbarIntegration(
context: Context,
toolbar: BrowserToolbar,
......
......@@ -21,8 +21,8 @@ import org.mozilla.fenix.ext.settings
* [DynamicDownloadDialog] is used to show a view in the current tab to the user, triggered when
* downloadFeature.onDownloadStopped gets invoked. It uses [DynamicDownloadDialogBehavior] to
* hide when the users scrolls through a website as to not impede his activities.
* */
*/
@Suppress("LongParameterList")
class DynamicDownloadDialog(
private val container: ViewGroup,
private val downloadState: DownloadState?,
......
......@@ -43,7 +43,7 @@ import mozilla.components.feature.tab.collections.Tab as ComponentTab
* [HomeFragment] controller. An interface that handles the view manipulation of the Tabs triggered
* by the Interactor.
*/
@SuppressWarnings("TooManyFunctions")
@Suppress("TooManyFunctions")
interface SessionControlController {
/**
* @see [CollectionInteractor.onCollectionAddTabTapped]
......@@ -146,7 +146,7 @@ interface SessionControlController {
fun handleCreateCollection()
}
@SuppressWarnings("TooManyFunctions", "LargeClass", "LongParameterList")
@Suppress("TooManyFunctions", "LargeClass")
class DefaultSessionControlController(
private val activity: HomeActivity,
private val engine: Engine,
......
......@@ -20,7 +20,7 @@ import org.mozilla.fenix.home.OnboardingState
// This method got a little complex with the addition of the tab tray feature flag
// When we remove the tabs from the home screen this will get much simpler again.
@SuppressWarnings("LongParameterList", "ComplexMethod")
@Suppress("ComplexMethod")
private fun normalModeAdapterItems(
topSites: List<TopSite>,
collections: List<TabCollection>,
......
......@@ -28,7 +28,7 @@ import org.mozilla.fenix.ext.nav
* [BookmarkFragment] controller.
* Delegated by View Interactors, handles container business logic and operates changes on it.
*/
@SuppressWarnings("TooManyFunctions")
@Suppress("TooManyFunctions")
interface BookmarkController {
fun handleBookmarkChanged(item: BookmarkNode)
fun handleBookmarkTapped(item: BookmarkNode)
......@@ -47,7 +47,7 @@ interface BookmarkController {
fun handleBackPressed()
}
@SuppressWarnings("TooManyFunctions", "LongParameterList")
@Suppress("TooManyFunctions")
class DefaultBookmarkController(
private val activity: HomeActivity,
private val navController: NavController,
......
......@@ -53,7 +53,7 @@ interface TabTrayController {
* @param showChooseCollectionDialog callback allowing saving a list of sessions to an existing collection.
* @param showAddNewCollectionDialog callback allowing for saving a list of sessions to a new collection.
*/
@Suppress("TooManyFunctions", "LongParameterList")
@Suppress("TooManyFunctions")
class DefaultTabTrayController(
private val activity: HomeActivity,
private val navController: NavController,
......
......@@ -147,7 +147,6 @@ detekt {
version = "1.9.1"
input = files("$projectDir/app/src")
config = files("$projectDir/config/detekt.yml")
baseline = file("$projectDir/config/detekt-baseline.xml")
reports {
html {
......
<?xml version="1.0" ?>
<SmellBaseline>
<Blacklist></Blacklist>
<Whitelist>
<ID>LongParameterList:BackgroundServices.kt$BackgroundServices$( private val context: Context, private val push: Push, crashReporter: CrashReporter, historyStorage: Lazy&lt;PlacesHistoryStorage&gt;, bookmarkStorage: Lazy&lt;PlacesBookmarksStorage&gt;, passwordsStorage: Lazy&lt;SyncableLoginsStorage&gt;, remoteTabsStorage: Lazy&lt;RemoteTabsStorage&gt; )</ID>
<ID>LongParameterList:BookmarkController.kt$DefaultBookmarkController$( private val activity: HomeActivity, private val navController: NavController, private val clipboardManager: ClipboardManager?, private val scope: CoroutineScope, private val store: BookmarkFragmentStore, private val sharedViewModel: BookmarksSharedViewModel, private val loadBookmarkNode: suspend (String) -&gt; BookmarkNode?, private val showSnackbar: (String) -&gt; Unit, private val deleteBookmarkNodes: (Set&lt;BookmarkNode&gt;, Event) -&gt; Unit, private val deleteBookmarkFolder: (BookmarkNode) -&gt; Unit, private val invokePendingDeletion: () -&gt; Unit )</ID>
<ID>LongParameterList:BrowserToolbarController.kt$DefaultBrowserToolbarController$( private val activity: HomeActivity, private val navController: NavController, private val readerModeController: ReaderModeController, private val sessionFeature: ViewBoundFeatureWrapper&lt;SessionFeature&gt;, private val sessionManager: SessionManager, private val findInPageLauncher: () -&gt; Unit, private val engineView: EngineView, private val browserAnimator: BrowserAnimator, private val swipeRefresh: SwipeRefreshLayout, private val customTabSession: Session?, private val openInFenixIntent: Intent, private val bookmarkTapped: (Session) -&gt; Unit, private val scope: CoroutineScope, private val tabCollectionStorage: TabCollectionStorage, private val topSiteStorage: TopSiteStorage, private val onTabCounterClicked: () -&gt; Unit, private val onCloseTab: (Session) -&gt; Unit )</ID>
<ID>LongParameterList:CollectionCreationController.kt$DefaultCollectionCreationController$( private val store: CollectionCreationStore, private val dismiss: () -&gt; Unit, private val metrics: MetricController, private val tabCollectionStorage: TabCollectionStorage, private val sessionManager: SessionManager, private val ioScope: CoroutineScope )</ID>
<ID>LongParameterList:CollectionCreationTabListAdapter.kt$TabDiffUtil$( val old: List&lt;Tab&gt;, val new: List&lt;Tab&gt;, val oldSelected: Set&lt;Tab&gt;, val newSelected: Set&lt;Tab&gt;, val oldHideCheckboxes: Boolean, val newHideCheckboxes: Boolean )</ID>
<ID>LongParameterList:CustomTabsIntegration.kt$CustomTabsIntegration$( sessionManager: SessionManager, toolbar: BrowserToolbar, sessionId: String, activity: Activity, onItemTapped: (ToolbarMenu.Item) -&gt; Unit = {}, shouldReverseItems: Boolean, isPrivate: Boolean )</ID>
<ID>LongParameterList:DefaultToolbarMenu.kt$DefaultToolbarMenu$( private val context: Context, private val sessionManager: SessionManager, private val store: BrowserStore, hasAccountProblem: Boolean = false, shouldReverseItems: Boolean, private val onItemTapped: (ToolbarMenu.Item) -&gt; Unit = {}, private val lifecycleOwner: LifecycleOwner, private val bookmarksStorage: BookmarksStorage )</ID>
<ID>LongParameterList:DynamicDownloadDialog.kt$DynamicDownloadDialog$( private val container: ViewGroup, private val downloadState: DownloadState?, private val didFail: Boolean, private val tryAgain: (Long) -&gt; Unit, private val onCannotOpenFile: () -&gt; Unit, private val view: View, private val toolbarHeight: Int, private val onDismiss: () -&gt; Unit )</ID>
<ID>LongParameterList:HistoryController.kt$DefaultHistoryController$( private val store: HistoryFragmentStore, private val navController: NavController, private val resources: Resources, private val snackbar: FenixSnackbar, private val clipboardManager: ClipboardManager, private val scope: CoroutineScope, private val openToBrowser: (item: HistoryItem, mode: BrowsingMode?) -&gt; Unit, private val displayDeleteAll: () -&gt; Unit, private val invalidateOptionsMenu: () -&gt; Unit, private val deleteHistoryItems: (Set&lt;HistoryItem&gt;) -&gt; Unit, private val syncHistory: suspend () -&gt; Unit )</ID>
<ID>LongParameterList:IntentProcessors.kt$IntentProcessors$( private val context: Context, private val sessionManager: SessionManager, private val sessionUseCases: SessionUseCases, private val searchUseCases: SearchUseCases, private val relationChecker: RelationChecker, private val customTabsStore: CustomTabsServiceStore, private val migrationStore: MigrationStore, private val manifestStorage: ManifestStorage )</ID>
<ID>LongParameterList:QuickSettingsController.kt$DefaultQuickSettingsController$( private val context: Context, private val quickSettingsStore: QuickSettingsFragmentStore, private val ioScope: CoroutineScope, private val navController: NavController, private val session: Session?, private var sitePermissions: SitePermissions?, private val settings: Settings, private val permissionStorage: PermissionStorage, private val reload: ReloadUrlUseCase, private val addNewTab: AddNewTabUseCase, private val requestRuntimePermissions: OnNeedToRequestPermissions = { }, private val displayPermissions: () -&gt; Unit, private val dismiss: () -&gt; Unit )</ID>
<ID>LongParameterList:SessionControlController.kt$DefaultSessionControlController$( private val activity: HomeActivity, private val fragmentStore: HomeFragmentStore, private val navController: NavController, private val viewLifecycleScope: CoroutineScope, private val getListOfTabs: () -&gt; List&lt;Tab&gt;, private val hideOnboarding: () -&gt; Unit, private val registerCollectionStorageObserver: () -&gt; Unit, private val showDeleteCollectionPrompt: (tabCollection: TabCollection, title: String?, message: String) -&gt; Unit, private val openSettingsScreen: () -&gt; Unit, private val openWhatsNewLink: () -&gt; Unit, private val openPrivacyNotice: () -&gt; Unit, private val showTabTray: () -&gt; Unit )</ID>
<ID>LongParameterList:ShareController.kt$DefaultShareController$( private val context: Context, private val shareData: List&lt;ShareData&gt;, private val sendTabUseCases: SendTabUseCases, private val snackbar: FenixSnackbar, private val navController: NavController, private val recentAppsStorage: RecentAppsStorage, private val viewLifecycleScope: CoroutineScope, private val dismiss: (ShareController.Result) -&gt; Unit )</ID>
<ID>LongParameterList:ToolbarIntegration.kt$DefaultToolbarIntegration$( context: Context, toolbar: BrowserToolbar, toolbarMenu: ToolbarMenu, domainAutocompleteProvider: DomainAutocompleteProvider, historyStorage: HistoryStorage, sessionManager: SessionManager, sessionId: String? = null, isPrivate: Boolean, interactor: BrowserToolbarViewInteractor, engine: Engine )</ID>
<ID>LongParameterList:ToolbarIntegration.kt$ToolbarIntegration$( context: Context, toolbar: BrowserToolbar, toolbarMenu: ToolbarMenu, sessionId: String?, isPrivate: Boolean, renderStyle: ToolbarFeature.RenderStyle )</ID>
<ID>LongParameterList:ToolbarView.kt$ToolbarView$( private val context: Context, private val interactor: ToolbarInteractor, private val historyStorage: HistoryStorage?, private val isPrivate: Boolean, val view: BrowserToolbar, engine: Engine )</ID>
<ID>LongParameterList:UseCases.kt$UseCases$( private val context: Context, private val engine: Engine, private val sessionManager: SessionManager, private val store: BrowserStore, private val searchEngineManager: SearchEngineManager, private val shortcutManager: WebAppShortcutManager )</ID>
</Whitelist>
</SmellBaseline>
......@@ -76,9 +76,12 @@ complexity:
# https://github.com/mozilla-mobile/fenix/issues/4861
threshold: 75
LongParameterList:
active: true
threshold: 6
active: trued
excludes: "**/*Controller.kt, **/*Integration.kt"
functionThreshold: 6
constructorThreshold: 7
ignoreDefaultParameters: false
ignoreDataClasses: true
MethodOverloading:
active: false
threshold: 6
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment