Bug 1874861 - Removed redundant LongParameterList suppression's

fenix/123.0
t-p-white 4 months ago committed by mergify[bot]
parent 931c43127f
commit ca7896ad4b

@ -92,7 +92,6 @@ class AppRequestInterceptor(
// This method is the only difference from the production code.
// Otherwise the code should be kept identical
@Suppress("LongParameterList")
private fun interceptFxaRequest(
engineSession: EngineSession,
uri: String,

@ -148,7 +148,7 @@ import java.util.Locale
* - home screen
* - browser screen
*/
@SuppressWarnings("TooManyFunctions", "LargeClass", "LongParameterList", "LongMethod")
@SuppressWarnings("TooManyFunctions", "LargeClass", "LongMethod")
open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
// DO NOT MOVE ANYTHING ABOVE THIS, GETTING INIT TIME IS CRITICAL
// we need to store startup timestamp for warm startup. we cant directly store
@ -960,7 +960,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
* was opened from history.
* @param additionalHeaders The extra headers to use when loading the URL.
*/
@Suppress("LongParameterList")
fun openToBrowserAndLoad(
searchTermOrURL: String,
newTab: Boolean,

@ -22,7 +22,6 @@ import androidx.coordinatorlayout.widget.CoordinatorLayout
* @param dismissAction Optional callback invoked when the user dismisses the banner.
* @param actionToPerform The action to be performed on action button press.
*/
@Suppress("LongParameterList")
class DynamicInfoBanner(
private val context: Context,
container: ViewGroup,

@ -26,7 +26,6 @@ import org.mozilla.fenix.ext.settings
* @property dismissAction Optional callback invoked when the user dismisses the banner.
* @param actionToPerform The action to be performed on action button press.
*/
@SuppressWarnings("LongParameterList")
open class InfoBanner(
private val context: Context,
private val container: ViewGroup,

@ -54,7 +54,7 @@ import org.mozilla.fenix.theme.ThemeManager
* @param pinnedSiteStorage Used to check if the current url is a pinned site.
* @property isPinningSupported true if the launcher supports adding shortcuts.
*/
@Suppress("LargeClass", "LongParameterList", "TooManyFunctions")
@Suppress("LargeClass", "TooManyFunctions")
open class DefaultToolbarMenu(
private val context: Context,
private val store: BrowserStore,

@ -76,7 +76,6 @@ abstract class ToolbarIntegration(
}
}
@Suppress("LongParameterList")
class DefaultToolbarIntegration(
context: Context,
toolbar: BrowserToolbar,

@ -41,7 +41,6 @@ import org.mozilla.fenix.theme.FirefoxTheme
* By default set to a solid color in [DefaultImagePlaceholder].
*/
@Composable
@Suppress("LongParameterList")
fun Image(
url: String,
modifier: Modifier = Modifier,

@ -42,7 +42,6 @@ private const val FALLBACK_ICON_SIZE = 36
* @param alignment [Alignment] used to draw the image content.
*/
@Composable
@Suppress("LongParameterList")
fun TabThumbnail(
tab: TabSessionState,
storage: ThumbnailStorage,

@ -38,7 +38,6 @@ import org.mozilla.fenix.theme.FirefoxTheme
* @param fallbackContent The content to display with a thumbnail is unable to be loaded.
*/
@Composable
@Suppress("LongParameterList")
fun ThumbnailImage(
request: ImageLoadRequest,
storage: ThumbnailStorage,

@ -38,7 +38,6 @@ import org.mozilla.fenix.theme.FirefoxTheme
* @param onClick Optional lambda for handling header clicks.
* @param actions Optional Composable for adding UI to the end of the header.
*/
@Suppress("LongParameterList")
@Composable
fun ExpandableListHeader(
headerText: String,

@ -91,7 +91,7 @@ import org.mozilla.fenix.theme.FirefoxTheme
*/
@OptIn(ExperimentalMaterialApi::class, ExperimentalFoundationApi::class)
@Composable
@Suppress("MagicNumber", "LongParameterList", "LongMethod")
@Suppress("MagicNumber", "LongMethod")
fun TabGridItem(
tab: TabSessionState,
storage: ThumbnailStorage,

@ -75,7 +75,7 @@ import org.mozilla.fenix.theme.FirefoxTheme
*/
@OptIn(ExperimentalFoundationApi::class, ExperimentalMaterialApi::class)
@Composable
@Suppress("MagicNumber", "LongMethod", "LongParameterList")
@Suppress("MagicNumber", "LongMethod")
fun TabListItem(
tab: TabSessionState,
storage: ThumbnailStorage,
@ -209,7 +209,6 @@ private fun clickableColor() = when (isSystemInDarkTheme()) {
}
@Composable
@Suppress("LongParameterList")
private fun Thumbnail(
tab: TabSessionState,
size: Int,

@ -104,7 +104,6 @@ private fun generateTabList(
}
@Composable
@Suppress("LongParameterList")
private fun TabToolsContent(
activeTabCount: Int,
inactiveTabCount: Int,

@ -47,7 +47,6 @@ import org.mozilla.fenix.GleanMetrics.HomeMenu as HomeMenuMetrics
* clicked.
* @param fxaEntrypoint The source entry point to FxA.
*/
@Suppress("LongParameterList")
class HomeMenuView(
private val view: View,
private val context: Context,

@ -239,7 +239,7 @@ fun PocketSponsoredStory(
* @param onDiscoverMoreClicked Callback for when the user taps an element which contains an
*/
@OptIn(ExperimentalComposeUiApi::class)
@Suppress("LongParameterList", "LongMethod")
@Suppress("LongMethod")
@Composable
fun PocketStories(
@PreviewParameter(PocketStoryProvider::class) stories: List<PocketStory>,
@ -367,7 +367,6 @@ private fun alignColumnToTitlePadding(screenWidth: Dp, contentPadding: Dp) =
* @param onCategoryClick Callback for when the user taps a category.
*/
@OptIn(ExperimentalComposeUiApi::class)
@Suppress("LongParameterList")
@Composable
fun PocketStoriesCategories(
categories: List<PocketRecommendedStoriesCategory>,

@ -69,7 +69,7 @@ private const val THUMBNAIL_SIZE = 108
* @param onRemoveSyncedTab Invoked when user clicks on the "Remove" dropdown menu option.
*/
@OptIn(ExperimentalFoundationApi::class)
@Suppress("LongMethod", "LongParameterList")
@Suppress("LongMethod")
@Composable
fun RecentSyncedTab(
tab: RecentSyncedTab?,

@ -190,7 +190,6 @@ class AdapterItemDiffCallback : DiffUtil.ItemCallback<AdapterItem>() {
}
}
@Suppress("LongParameterList")
class SessionControlAdapter(
private val interactor: SessionControlInteractor,
private val viewLifecycleOwner: LifecycleOwner,

@ -239,7 +239,7 @@ data class TopSiteColors(
* @param onTopSiteLongClick Invoked when the user long clicks on a top site.
* @param onTopSitesItemBound Invoked during the composition of a top site item.
*/
@Suppress("LongParameterList", "LongMethod")
@Suppress("LongMethod")
@OptIn(ExperimentalFoundationApi::class, ExperimentalComposeUiApi::class)
@Composable
private fun TopSiteItem(
@ -401,7 +401,6 @@ private fun TopSiteFavicon(url: String, imageUrl: String? = null) {
}
@Composable
@Suppress("LongParameterList")
private fun getMenuItems(
topSite: TopSite,
onOpenInPrivateTabClicked: (topSite: TopSite) -> Unit,

@ -54,7 +54,6 @@ class HistoryListItemViewHolder(
* @param groupPendingDeletionCount allows to properly display the number of items inside a
* history group, taking into account pending removal of items inside.
*/
@Suppress("LongParameterList")
fun bind(
item: History,
timeGroup: HistoryItemTimeGroup?,

@ -140,7 +140,6 @@ data class SearchFragmentState(
/**
* Creates the initial state for the search fragment.
*/
@Suppress("LongParameterList")
fun createInitialSearchFragmentState(
components: Components,
tabId: String?,

@ -30,7 +30,6 @@ import mozilla.components.service.fxa.manager.SyncEnginesStorage
* @param onReconnectClicked A callback executed when the [syncPreference] is clicked with a
* preference status of "Reconnect".
*/
@Suppress("LongParameterList")
class SyncPreferenceView(
private val syncPreference: SyncPreference,
lifecycleOwner: LifecycleOwner,

@ -60,7 +60,6 @@ import org.mozilla.fenix.theme.FirefoxTheme
* @param onDeleteEngineClicked Invoked when the user clicks on the delete item of the three dot menu.
* @param onAddEngineClicked Invoked when the user clicks on the add search engine button.
*/
@Suppress("LongParameterList")
@Composable
fun SearchEngineShortcuts(
categoryTitle: String,
@ -125,7 +124,7 @@ private fun Title(title: String) {
}
}
@Suppress("LongParameterList", "LongMethod")
@Suppress("LongMethod")
@Composable
private fun SearchItem(
engine: SearchEngine,

@ -68,7 +68,6 @@ import org.mozilla.fenix.wallpapers.Wallpaper
*/
@SuppressLint("UnusedMaterialScaffoldPaddingParameter")
@Composable
@Suppress("LongParameterList")
fun WallpaperSettings(
wallpaperGroups: Map<Wallpaper.Collection, List<Wallpaper>>,
defaultWallpaper: Wallpaper,
@ -193,7 +192,6 @@ private fun WallpaperGroupHeading(
* @param numColumns The number of columns that will occupy the grid.
*/
@Composable
@Suppress("LongParameterList")
fun WallpaperThumbnails(
wallpapers: List<Wallpaper>,
defaultWallpaper: Wallpaper,
@ -244,7 +242,6 @@ fun WallpaperThumbnails(
* @param onSelect Action to take when a new wallpaper is selected.
*/
@Composable
@Suppress("LongParameterList")
private fun WallpaperThumbnailItem(
wallpaper: Wallpaper,
defaultWallpaper: Wallpaper,

@ -48,7 +48,7 @@ private const val MAX_SUPPORTED_VENDORS_PER_TLD = 3
* @param onPrimaryButtonClick Invoked when a user clicks on the primary button.
* @param onSecondaryButtonClick Invoked when a user clicks on the secondary button.
*/
@Suppress("LongParameterList", "LongMethod")
@Suppress("LongMethod")
@Composable
fun ReviewQualityCheckContextualOnboarding(
productVendors: List<ProductVendor>,

@ -61,7 +61,7 @@ interface NavigationInteractor {
/**
* A default implementation of [NavigationInteractor].
*/
@Suppress("LongParameterList", "TooManyFunctions")
@Suppress("TooManyFunctions")
class DefaultNavigationInteractor(
private val browserStore: BrowserStore,
private val navController: NavController,

@ -481,7 +481,7 @@ private fun TabsTrayAutoCloseBannerPreview() {
)
}
@Suppress("LongMethod", "LongParameterList")
@Suppress("LongMethod")
@Composable
private fun TabsTrayPreviewRoot(
displayTabsInGrid: Boolean = true,

@ -184,7 +184,7 @@ fun TabsTrayBanner(
}
}
@Suppress("LongMethod", "LongParameterList")
@Suppress("LongMethod")
@Composable
private fun SingleSelectBanner(
menuItems: List<MenuItem>,
@ -381,7 +381,7 @@ private fun NormalTabsTabIcon(normalTabCount: Int) {
* @param onSaveToCollectionsClick Invoked when the user clicks on the save to collection button.
* @param onShareSelectedTabs Invoked when the user clicks on the share button.
*/
@Suppress("LongMethod", "LongParameterList")
@Suppress("LongMethod")
@Composable
private fun MultiSelectBanner(
menuItems: List<MenuItem>,

@ -639,7 +639,6 @@ class TabsTrayFragment : AppCompatDialogFragment() {
}
@VisibleForTesting
@Suppress("LongParameterList")
internal fun setupPager(
context: Context,
lifecycleOwner: LifecycleOwner,

@ -20,7 +20,6 @@ import org.mozilla.fenix.tabstray.viewholders.NormalBrowserPageViewHolder
import org.mozilla.fenix.tabstray.viewholders.PrivateBrowserPageViewHolder
import org.mozilla.fenix.tabstray.viewholders.SyncedTabsPageViewHolder
@Suppress("LongParameterList")
class TrayPagerAdapter(
internal val context: Context,
internal val lifecycleOwner: LifecycleOwner,

@ -54,7 +54,6 @@ import org.mozilla.fenix.tabstray.ext.toDisplayTitle
* @property featureName [String] representing the name of the feature displaying tabs. Used in telemetry reporting.
* @param store [BrowserStore] containing the complete state of the browser and methods to update that.
*/
@Suppress("LongParameterList")
abstract class AbstractBrowserTabViewHolder(
itemView: View,
private val imageLoader: ImageLoader,

@ -34,7 +34,6 @@ import org.mozilla.fenix.GleanMetrics.TabsTray as TabsTrayMetrics
* @param interactor [InactiveTabsInteractor] used to respond to interactions with the inactive tabs header
* and the auto close dialog.
*/
@Suppress("LongParameterList")
class InactiveTabViewHolder(
composeView: ComposeView,
lifecycleOwner: LifecycleOwner,

@ -20,7 +20,6 @@ import org.mozilla.fenix.tabstray.TabsTrayStore
* and the auto close dialog.
* @property featureName [String] representing the name of the inactive tabs feature for telemetry reporting.
*/
@Suppress("LongParameterList")
class InactiveTabsAdapter(
private val lifecycleOwner: LifecycleOwner,
private val tabsTrayStore: TabsTrayStore,

@ -126,7 +126,6 @@ internal fun TranslationsOptionsAnimation(
}
}
@Suppress("LongParameterList")
@Composable
internal fun TranslationsDialog(
learnMoreUrl: String,

@ -44,7 +44,6 @@ import org.mozilla.fenix.theme.FirefoxTheme
* @param onConfirmDownload Invoked when the user click on the "Download" dialog button.
* @param onCancel Invoked when the user clicks on the "Cancel" dialog button.
*/
@Suppress("LongParameterList")
@Composable
fun DownloadLanguageFileDialog(
fileSize: Long,

@ -44,7 +44,6 @@ fun Context.getUndoDelay(): Long {
* @param elevation The elevation of the [FenixSnackbar].
* @param paddedForBottomToolbar Whether or not [FenixSnackbar] is displayed with the bottom toolbar.
*/
@Suppress("LongParameterList")
fun CoroutineScope.allowUndo(
view: View,
message: String,

@ -40,8 +40,6 @@ import org.mozilla.fenix.theme.FirefoxTheme
* @param onExploreMoreButtonClicked Callback for when the bottom text button is clicked.
* @param onSelectWallpaper Callback for when a new wallpaper is selected.
*/
@Suppress("LongParameterList")
@ExperimentalMaterialApi
@Composable
fun WallpaperOnboarding(

@ -675,7 +675,6 @@ class TrackingProtectionPolicyFactoryTest {
every { shouldUseTrackingProtection } returns useTrackingProtection
}
@Suppress("LongParameterList")
private fun settingsForCustom(
shouldBlockCookiesInCustom: Boolean,
blockTrackingContentInCustom: String = all, // ["private", "all"]

@ -843,7 +843,6 @@ class DefaultBrowserToolbarMenuControllerTest {
}
}
@Suppress("LongParameterList")
private fun createController(
scope: CoroutineScope,
store: BrowserStore,

@ -527,7 +527,6 @@ class BookmarkControllerTest {
}
}
@Suppress("LongParameterList")
private fun createController(
loadBookmarkNode: suspend (String, Boolean) -> BookmarkNode? = { _, _ -> null },
showSnackbar: (String) -> Unit = { _ -> },

@ -310,7 +310,6 @@ class HistoryMetadataGroupControllerTest {
)
}
@Suppress("LongParameterList")
private fun createController(
deleteSnackbar: (
items: Set<History.Metadata>,

@ -163,7 +163,6 @@ class NavigationInteractorTest {
verify(exactly = 1) { navController.navigate(any<NavDirections>()) }
}
@Suppress("LongParameterList")
private fun createInteractor(
browserStore: BrowserStore = store,
dismissTabTray: () -> Unit = { },

@ -159,7 +159,6 @@ class AbstractBrowserTabViewHolderTest {
verify { mediaSessionController.pause() }
}
@Suppress("LongParameterList")
class TestTabTrayViewHolder(
itemView: View,
imageLoader: ImageLoader,

Loading…
Cancel
Save