From e7077466ff048a77b5bc00bce7f0913935cb3e26 Mon Sep 17 00:00:00 2001 From: Michael Comella Date: Wed, 22 Sep 2021 09:01:12 -0700 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/21294: suppress MaxLineLength in Fact.toEvent. These double comparisons are easier to read and see the pattern of on one line so I'd rather keep them on one line. Additionally, it's difficult to test each change individually so I'd rather not make additional changes. To do this, I suppressed the max line length warning. --- .../org/mozilla/fenix/components/metrics/MetricController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt index b1975d2508..ca29647344 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt @@ -157,7 +157,7 @@ internal class ReleaseMetricController( MetricServiceType.Marketing -> isMarketingDataTelemetryEnabled() } - @Suppress("LongMethod") + @Suppress("LongMethod", "MaxLineLength") private fun Fact.toEvent(): Event? = when { Component.FEATURE_PROMPTS == component && LoginDialogFacts.Items.DISPLAY == item -> Event.LoginDialogPromptDisplayed Component.FEATURE_PROMPTS == component && LoginDialogFacts.Items.CANCEL == item -> Event.LoginDialogPromptCancelled