GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Resolve Detekt failures

Fixed upstream on master with 52d4ffde
parent f825c68e
Pipeline #858 failed with stages
in 36 minutes and 34 seconds
......@@ -28,7 +28,8 @@ class AppRequestInterceptor(private val context: Context) : RequestInterceptor {
): RequestInterceptor.InterceptionResponse? {
return context.components.services.appLinksInterceptor
.onLoadRequest(
engineSession, uri, lastUri, hasUserGesture, isSameDomain, isRedirect, isDirectNavigation, isSubframeRequest
engineSession, uri, lastUri, hasUserGesture, isSameDomain,
isRedirect, isDirectNavigation, isSubframeRequest
)
}
......
......@@ -35,6 +35,7 @@ import kotlin.math.min
* Handles intercepting touch events on the toolbar for swipe gestures and executes the
* necessary animations.
*/
@SuppressWarnings("LargeClass", "TooManyFunctions")
class ToolbarGestureHandler(
private val activity: Activity,
private val contentLayout: View,
......@@ -67,6 +68,7 @@ class ToolbarGestureHandler(
private var gestureDirection = GestureDirection.LEFT_TO_RIGHT
@SuppressWarnings("ComplexCondition")
override fun onSwipeStarted(start: PointF, next: PointF): Boolean {
val dx = next.x - start.x
val dy = next.y - start.y
......
......@@ -95,6 +95,7 @@ class LeanplumMetricsService(
deviceId
}
@SuppressWarnings("ComplexMethod")
override fun start() {
if (!application.settings().isMarketingTelemetryEnabled) return
......@@ -255,7 +256,7 @@ class LeanplumMetricsService(
"jpn" // Japanese
)
private val PREFERENCE_NAME = "LEANPLUM_PREFERENCES"
private val DEVICE_ID_KEY = "LP_DEVICE_ID"
private const val PREFERENCE_NAME = "LEANPLUM_PREFERENCES"
private const val DEVICE_ID_KEY = "LP_DEVICE_ID"
}
}
......@@ -532,6 +532,7 @@ sealed class Event {
get() = null
}
@SuppressWarnings("LongMethod")
private fun Fact.toEvent(): Event? = when (Pair(component, item)) {
Component.FEATURE_PROMPTS to LoginDialogFacts.Items.DISPLAY -> Event.LoginDialogPromptDisplayed
Component.FEATURE_PROMPTS to LoginDialogFacts.Items.CANCEL -> Event.LoginDialogPromptCancelled
......
......@@ -250,6 +250,7 @@ class BrowserToolbarView(
private const val TOOLBAR_ELEVATION = 16
}
@SuppressWarnings("ComplexCondition")
private fun ToolbarMenu.Item.performHapticIfNeeded(view: View) {
if (this is ToolbarMenu.Item.Reload && this.bypassCache ||
this is ToolbarMenu.Item.Back && this.viewHistory ||
......
......@@ -33,6 +33,7 @@ import org.mozilla.fenix.search.SearchFragmentState
/**
* View that contains and configures the BrowserAwesomeBar
*/
@SuppressWarnings("LargeClass")
class AwesomeBarView(
private val container: ViewGroup,
val interactor: AwesomeBarInteractor,
......
......@@ -33,7 +33,9 @@ class TabHistoryViewHolder(
history_layout.loadFavicon(item.url)
if (item.isSelected) {
history_layout.setBackgroundColor(history_layout.context.getColorFromAttr(R.attr.tabHistoryItemSelectedBackground))
history_layout.setBackgroundColor(
history_layout.context.getColorFromAttr(
R.attr.tabHistoryItemSelectedBackground))
} else {
history_layout.background = null
}
......
......@@ -76,7 +76,7 @@ complexity:
# https://github.com/mozilla-mobile/fenix/issues/4861
threshold: 75
LongParameterList:
active: trued
active: true
excludes: "**/*Controller.kt, **/*Integration.kt"
functionThreshold: 6
constructorThreshold: 7
......
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