Skip to content

Commit

Permalink
Auto-correct with detekt
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawa committed Dec 1, 2023
1 parent 83dc18e commit bce27c7
Show file tree
Hide file tree
Showing 306 changed files with 3,581 additions and 3,487 deletions.
12 changes: 6 additions & 6 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
import com.android.build.gradle.internal.tasks.factory.dependsOn
import org.gradle.configurationcache.extensions.capitalized
import java.io.FileInputStream
import java.util.*
import org.gradle.configurationcache.extensions.capitalized

plugins {
id(Dependencies.Plugin.androidApplicationId)
Expand Down Expand Up @@ -69,7 +69,7 @@ android {
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
"proguard-rules.pro",
)
}
create(BuildTypes.FDROID) {
Expand Down Expand Up @@ -135,7 +135,7 @@ android {
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-opt-in=kotlinx.coroutines.ObsoleteCoroutinesApi",
// Opt-in option for Koin annotation of KoinComponent.
"-opt-in=kotlin.RequiresOptIn"
"-opt-in=kotlin.RequiresOptIn",
)
}

Expand Down Expand Up @@ -167,7 +167,7 @@ android {
"META-INF/LGPL2.1",
// Fixes packaging error caused by: jetified-junit-*
"META-INF/LICENSE.md",
"META-INF/LICENSE-notice.md"
"META-INF/LICENSE-notice.md",
)
}
}
Expand All @@ -187,7 +187,7 @@ android {
buildConfigField(
"boolean",
"ENABLE_IN_APP_VERSION_NOTIFICATIONS",
enableInAppVersionNotifications
enableInAppVersionNotifications,
)
}

Expand All @@ -212,7 +212,7 @@ android {

val variantName = name
val capitalizedVariantName = variantName.capitalized()
val artifactName = "MullvadVPN-${versionName}${artifactSuffix}"
val artifactName = "MullvadVPN-${versionName}$artifactSuffix"

tasks.register<Copy>("create${capitalizedVariantName}DistApk") {
from(packageApplicationProvider)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ fun SemanticsNodeInteractionsProvider.onNodeWithTagAndText(
text: String,
substring: Boolean = false,
ignoreCase: Boolean = false,
useUnmergedTree: Boolean = false
useUnmergedTree: Boolean = false,
): SemanticsNodeInteraction =
onNode(hasTestTag(testTag).and(hasText(text, substring, ignoreCase)), useUnmergedTree)
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ class AccountScreenTest {
AccountScreen(
showSitePayment = true,
uiState =
AccountUiState(
deviceName = DUMMY_DEVICE_NAME,
accountNumber = DUMMY_ACCOUNT_NUMBER,
accountExpiry = null
),
AccountUiState(
deviceName = DUMMY_DEVICE_NAME,
accountNumber = DUMMY_ACCOUNT_NUMBER,
accountExpiry = null,
),
uiSideEffect = MutableSharedFlow<AccountViewModel.UiSideEffect>().asSharedFlow(),
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow()
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow(),
)
}

Expand All @@ -68,14 +68,14 @@ class AccountScreenTest {
AccountScreen(
showSitePayment = true,
uiState =
AccountUiState(
deviceName = DUMMY_DEVICE_NAME,
accountNumber = DUMMY_ACCOUNT_NUMBER,
accountExpiry = null
),
AccountUiState(
deviceName = DUMMY_DEVICE_NAME,
accountNumber = DUMMY_ACCOUNT_NUMBER,
accountExpiry = null,
),
uiSideEffect = MutableSharedFlow<AccountViewModel.UiSideEffect>().asSharedFlow(),
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow(),
onManageAccountClick = mockedClickHandler
onManageAccountClick = mockedClickHandler,
)
}

Expand All @@ -94,14 +94,14 @@ class AccountScreenTest {
AccountScreen(
showSitePayment = true,
uiState =
AccountUiState(
deviceName = DUMMY_DEVICE_NAME,
accountNumber = DUMMY_ACCOUNT_NUMBER,
accountExpiry = null
),
AccountUiState(
deviceName = DUMMY_DEVICE_NAME,
accountNumber = DUMMY_ACCOUNT_NUMBER,
accountExpiry = null,
),
uiSideEffect = MutableSharedFlow<AccountViewModel.UiSideEffect>().asSharedFlow(),
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow(),
onRedeemVoucherClick = mockedClickHandler
onRedeemVoucherClick = mockedClickHandler,
)
}

Expand All @@ -120,14 +120,14 @@ class AccountScreenTest {
AccountScreen(
showSitePayment = true,
uiState =
AccountUiState(
deviceName = DUMMY_DEVICE_NAME,
accountNumber = DUMMY_ACCOUNT_NUMBER,
accountExpiry = null
),
AccountUiState(
deviceName = DUMMY_DEVICE_NAME,
accountNumber = DUMMY_ACCOUNT_NUMBER,
accountExpiry = null,
),
uiSideEffect = MutableSharedFlow<AccountViewModel.UiSideEffect>().asSharedFlow(),
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow(),
onLogoutClick = mockedClickHandler
onLogoutClick = mockedClickHandler,
)
}

Expand All @@ -145,13 +145,13 @@ class AccountScreenTest {
AccountScreen(
showSitePayment = true,
uiState =
AccountUiState.default()
.copy(
paymentDialogData =
PurchaseResult.Completed.Success.toPaymentDialogData()
),
AccountUiState.default()
.copy(
paymentDialogData =
PurchaseResult.Completed.Success.toPaymentDialogData(),
),
uiSideEffect = MutableSharedFlow<AccountViewModel.UiSideEffect>().asSharedFlow(),
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow()
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow(),
)
}

Expand All @@ -166,13 +166,13 @@ class AccountScreenTest {
AccountScreen(
showSitePayment = true,
uiState =
AccountUiState.default()
.copy(
paymentDialogData =
PurchaseResult.Error.VerificationError(null).toPaymentDialogData()
),
AccountUiState.default()
.copy(
paymentDialogData =
PurchaseResult.Error.VerificationError(null).toPaymentDialogData(),
),
uiSideEffect = MutableSharedFlow<AccountViewModel.UiSideEffect>().asSharedFlow(),
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow()
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow(),
)
}

Expand All @@ -187,14 +187,14 @@ class AccountScreenTest {
AccountScreen(
showSitePayment = true,
uiState =
AccountUiState.default()
.copy(
paymentDialogData =
PurchaseResult.Error.FetchProductsError(ProductId(""), null)
.toPaymentDialogData()
),
AccountUiState.default()
.copy(
paymentDialogData =
PurchaseResult.Error.FetchProductsError(ProductId(""), null)
.toPaymentDialogData(),
),
uiSideEffect = MutableSharedFlow<AccountViewModel.UiSideEffect>().asSharedFlow(),
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow()
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow(),
)
}

Expand All @@ -209,9 +209,9 @@ class AccountScreenTest {
AccountScreen(
showSitePayment = true,
uiState =
AccountUiState.default().copy(billingPaymentState = PaymentState.Error.Billing),
AccountUiState.default().copy(billingPaymentState = PaymentState.Error.Billing),
uiSideEffect = MutableSharedFlow<AccountViewModel.UiSideEffect>().asSharedFlow(),
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow()
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow(),
)
}

Expand All @@ -229,13 +229,13 @@ class AccountScreenTest {
AccountScreen(
showSitePayment = true,
uiState =
AccountUiState.default()
.copy(
billingPaymentState =
PaymentState.PaymentAvailable(listOf(mockPaymentProduct))
),
AccountUiState.default()
.copy(
billingPaymentState =
PaymentState.PaymentAvailable(listOf(mockPaymentProduct)),
),
uiSideEffect = MutableSharedFlow<AccountViewModel.UiSideEffect>().asSharedFlow(),
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow()
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow(),
)
}

Expand All @@ -253,13 +253,13 @@ class AccountScreenTest {
AccountScreen(
showSitePayment = true,
uiState =
AccountUiState.default()
.copy(
billingPaymentState =
PaymentState.PaymentAvailable(listOf(mockPaymentProduct))
),
AccountUiState.default()
.copy(
billingPaymentState =
PaymentState.PaymentAvailable(listOf(mockPaymentProduct)),
),
uiSideEffect = MutableSharedFlow<AccountViewModel.UiSideEffect>().asSharedFlow(),
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow()
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow(),
)
}

Expand All @@ -277,13 +277,13 @@ class AccountScreenTest {
AccountScreen(
showSitePayment = true,
uiState =
AccountUiState.default()
.copy(
billingPaymentState =
PaymentState.PaymentAvailable(listOf(mockPaymentProduct))
),
AccountUiState.default()
.copy(
billingPaymentState =
PaymentState.PaymentAvailable(listOf(mockPaymentProduct)),
),
uiSideEffect = MutableSharedFlow<AccountViewModel.UiSideEffect>().asSharedFlow(),
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow()
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow(),
)
}

Expand All @@ -293,7 +293,7 @@ class AccountScreenTest {
// Assert
composeTestRule
.onNodeWithText(
"We are currently verifying your purchase, this might take some time. Your time will be added if the verification is successful."
"We are currently verifying your purchase, this might take some time. Your time will be added if the verification is successful.",
)
.assertExists()
}
Expand All @@ -308,13 +308,13 @@ class AccountScreenTest {
AccountScreen(
showSitePayment = true,
uiState =
AccountUiState.default()
.copy(
billingPaymentState =
PaymentState.PaymentAvailable(listOf(mockPaymentProduct))
),
AccountUiState.default()
.copy(
billingPaymentState =
PaymentState.PaymentAvailable(listOf(mockPaymentProduct)),
),
uiSideEffect = MutableSharedFlow<AccountViewModel.UiSideEffect>().asSharedFlow(),
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow()
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow(),
)
}

Expand All @@ -334,14 +334,14 @@ class AccountScreenTest {
AccountScreen(
showSitePayment = true,
uiState =
AccountUiState.default()
.copy(
billingPaymentState =
PaymentState.PaymentAvailable(listOf(mockPaymentProduct))
),
AccountUiState.default()
.copy(
billingPaymentState =
PaymentState.PaymentAvailable(listOf(mockPaymentProduct)),
),
onPurchaseBillingProductClick = clickHandler,
uiSideEffect = MutableSharedFlow<AccountViewModel.UiSideEffect>().asSharedFlow(),
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow()
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow(),
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ChangelogDialogTest {
ChangelogDialog(
changesList = listOf(CHANGELOG_ITEM),
version = CHANGELOG_VERSION,
onDismiss = { mockedViewModel.dismissChangelogDialog() }
onDismiss = { mockedViewModel.dismissChangelogDialog() },
)
}

Expand Down
Loading

0 comments on commit bce27c7

Please sign in to comment.