Update LongParameterList baseline
This commit is contained in:
parent
eab9660146
commit
61d6b333de
|
@ -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 {
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
<?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<PlacesHistoryStorage>, bookmarkStorage: Lazy<PlacesBookmarksStorage>, passwordsStorage: Lazy<SyncableLoginsStorage>, remoteTabsStorage: Lazy<RemoteTabsStorage> )</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) -> BookmarkNode?, private val showSnackbar: (String) -> Unit, private val deleteBookmarkNodes: (Set<BookmarkNode>, Event) -> Unit, private val deleteBookmarkFolder: (BookmarkNode) -> Unit, private val invokePendingDeletion: () -> Unit )</ID>
|
||||
<ID>LongParameterList:BrowserToolbarController.kt$DefaultBrowserToolbarController$( private val activity: HomeActivity, private val navController: NavController, private val readerModeController: ReaderModeController, private val sessionFeature: ViewBoundFeatureWrapper<SessionFeature>, private val sessionManager: SessionManager, private val findInPageLauncher: () -> 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) -> Unit, private val scope: CoroutineScope, private val tabCollectionStorage: TabCollectionStorage, private val topSiteStorage: TopSiteStorage, private val onTabCounterClicked: () -> Unit, private val onCloseTab: (Session) -> Unit )</ID>
|
||||
<ID>LongParameterList:CollectionCreationController.kt$DefaultCollectionCreationController$( private val store: CollectionCreationStore, private val dismiss: () -> 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<Tab>, val new: List<Tab>, val oldSelected: Set<Tab>, val newSelected: Set<Tab>, val oldHideCheckboxes: Boolean, val newHideCheckboxes: Boolean )</ID>
|
||||
<ID>LongParameterList:CustomTabsIntegration.kt$CustomTabsIntegration$( sessionManager: SessionManager, toolbar: BrowserToolbar, sessionId: String, activity: Activity, onItemTapped: (ToolbarMenu.Item) -> 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) -> 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) -> Unit, private val onCannotOpenFile: () -> Unit, private val view: View, private val toolbarHeight: Int, private val onDismiss: () -> 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?) -> Unit, private val displayDeleteAll: () -> Unit, private val invalidateOptionsMenu: () -> Unit, private val deleteHistoryItems: (Set<HistoryItem>) -> Unit, private val syncHistory: suspend () -> 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: () -> Unit, private val dismiss: () -> 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: () -> List<Tab>, private val hideOnboarding: () -> Unit, private val registerCollectionStorageObserver: () -> Unit, private val showDeleteCollectionPrompt: (tabCollection: TabCollection, title: String?, message: String) -> Unit, private val openSettingsScreen: () -> Unit, private val openWhatsNewLink: () -> Unit, private val openPrivacyNotice: () -> Unit, private val showTabTray: () -> Unit )</ID>
|
||||
<ID>LongParameterList:ShareController.kt$DefaultShareController$( private val context: Context, private val shareData: List<ShareData>, 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) -> 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
|
||||
|
|
Loading…
Reference in New Issue