Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Fixed some formatting errors from detekt. (#2842)
Browse files Browse the repository at this point in the history
* Fixed some formatting errors from detekt.

* Add Detekt baseline

* Final changes push

---------

Co-authored-by: Iliyan Germanov <[email protected]>
  • Loading branch information
venumanas87 and ILIYANGERMANOV authored Dec 13, 2023
1 parent 115c6e8 commit 5160d09
Show file tree
Hide file tree
Showing 434 changed files with 1,146 additions and 977 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,4 @@ dependencies {
kover(projects.tempOldDesign)
kover(projects.widgetAddTransaction)
kover(projects.widgetBalance)
}
}
2 changes: 1 addition & 1 deletion app/src/main/java/com/ivy/IvyNavGraph.kt
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ fun BoxWithConstraintsScope.IvyNavGraph(screen: Screen?) {
ContributorsScreen -> ContributorsScreenImpl()
ReleasesScreen -> ReleasesScreenImpl()
}
}
}
2 changes: 1 addition & 1 deletion app/src/main/java/com/ivy/wallet/IvyAndroidApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ class IvyAndroidApp : Application(), Configuration.Provider {
Timber.plant(DebugTree())
}
}
}
}
4 changes: 2 additions & 2 deletions app/src/main/java/com/ivy/wallet/IvyAppStarter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package com.ivy.wallet

import android.content.Context
import android.content.Intent
import com.ivy.domain.AppStarter
import com.ivy.base.model.TransactionType
import com.ivy.domain.AppStarter
import dagger.hilt.android.qualifiers.ApplicationContext
import javax.inject.Inject

Expand Down Expand Up @@ -36,4 +36,4 @@ class IvyAppStarter @Inject constructor(
private fun Intent.applyWidgetStartFlags() {
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
}
}
}
2 changes: 1 addition & 1 deletion app/src/main/java/com/ivy/wallet/PaymentTileService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ class PaymentTileService : TileService() {
override fun onTileRemoved() {
super.onTileRemoved()
}
}
}
14 changes: 7 additions & 7 deletions app/src/main/java/com/ivy/wallet/RootActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ import com.google.android.material.timepicker.MaterialTimePicker
import com.google.android.material.timepicker.TimeFormat
import com.google.android.play.core.review.ReviewManagerFactory
import com.ivy.IvyNavGraph
import com.ivy.domain.RootScreen
import com.ivy.design.api.IvyUI
import com.ivy.domain.RootScreen
import com.ivy.home.customerjourney.CustomerJourneyCardsProvider
import com.ivy.legacy.Constants
import com.ivy.legacy.IvyWalletCtx
Expand Down Expand Up @@ -154,13 +154,13 @@ class RootActivity : AppCompatActivity(), RootScreen {

private fun setupDatePicker() {
ivyContext.onShowDatePicker = { minDate,
maxDate,
initialDate,
onDatePicked ->
maxDate,
initialDate,
onDatePicked ->
val datePicker =
MaterialDatePicker.Builder.datePicker()
.setSelection(MaterialDatePicker.todayInUtcMilliseconds())
.build()
.setSelection(MaterialDatePicker.todayInUtcMilliseconds())
.build()
datePicker.show(supportFragmentManager, "datePicker")
datePicker.addOnPositiveButtonClickListener {
onDatePicked(LocalDate.ofEpochDay(it / MILLISECONDS_IN_DAY))
Expand Down Expand Up @@ -338,7 +338,7 @@ class RootActivity : AppCompatActivity(), RootScreen {
)
.setAllowedAuthenticators(
BiometricManager.Authenticators.BIOMETRIC_WEAK or
BiometricManager.Authenticators.DEVICE_CREDENTIAL
BiometricManager.Authenticators.DEVICE_CREDENTIAL
)
.setConfirmationRequired(false)
.build()
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/ivy/wallet/RootViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.ivy.base.legacy.Theme
import com.ivy.base.legacy.stringRes
import com.ivy.base.model.TransactionType
import com.ivy.data.db.dao.read.SettingsDao
import com.ivy.frp.test.TestIdlingResource
import com.ivy.legacy.IvyWalletCtx
import com.ivy.legacy.data.SharedPrefs
Expand All @@ -15,8 +17,6 @@ import com.ivy.navigation.EditTransactionScreen
import com.ivy.navigation.MainScreen
import com.ivy.navigation.Navigation
import com.ivy.navigation.OnboardingScreen
import com.ivy.data.db.dao.read.SettingsDao
import com.ivy.base.model.TransactionType
import com.ivy.resources.R
import com.ivy.wallet.domain.deprecated.logic.notification.TransactionReminderLogic
import com.ivy.wallet.migrations.MigrationsManager
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/ivy/wallet/di/AppBindingsModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ import dagger.hilt.components.SingletonComponent
abstract class AppBindingsModule {
@Binds
abstract fun appStarter(appStarter: IvyAppStarter): AppStarter
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ class DisableGitHubAutoBackupMigration @Inject constructor(
it.remove(DatastoreKeys.GITHUB_LAST_BACKUP_EPOCH_SEC)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.ivy.design.l0_system.UI
import com.ivy.design.l0_system.style
import com.ivy.resources.R
import com.ivy.legacy.IvyWalletPreview
import com.ivy.legacy.utils.hasLockScreen
import com.ivy.resources.R
import com.ivy.wallet.ui.theme.Gray
import com.ivy.wallet.ui.theme.White
import com.ivy.wallet.ui.theme.components.IvyButton
import com.ivy.legacy.utils.hasLockScreen

@Composable
fun BoxWithConstraintsScope.AppLockedScreen(
Expand Down
2 changes: 1 addition & 1 deletion automations/base/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ plugins {

dependencies {
api(libs.bundles.ktor)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ fun <A, B> Either<A, B>.getOrThrow(): B {
ifLeft = { throw IvyError(it.toString()) },
ifRight = { it }
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ suspend fun <A> catchIO(
block()
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ interface Exact<Value, out ExactValue> {
ifLeft = { throw ExactError(it) },
ifRight = { it },
)
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package ivy.automate.base

class IvyError(msg: String) : Exception(msg)
class IvyError(msg: String) : Exception(msg)
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ interface GitHubService {
issueNumber: GitHubIssueNumber,
assignee: GitHubUsername
): Either<Throwable, Unit>
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,4 @@ class GitHubServiceImpl(

@Serializable
data class AssigneesPayload(val assignees: List<String>)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ package ivy.automate.base.github.model
data class GitHubComment(
val author: GitHubUser,
val text: String,
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package ivy.automate.base.github.model

data class GitHubIssue(
val assignee: GitHubUser?
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ value class GitHubIssueNumber private constructor(val value: String) {
return GitHubIssueNumber(raw.trim())
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package ivy.automate.base.github.model

data class GitHubLabel(
val name: GitHubLabelName,
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ value class GitHubLabelName private constructor(val value: String) {
return GitHubLabelName(raw.trim())
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ value class GitHubPAT private constructor(val value: String) {
return GitHubPAT(raw.trim())
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package ivy.automate.base.github.model

data class GitHubUser(
val username: GitHubUsername
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ value class GitHubUsername private constructor(val value: String) {
return GitHubUsername(raw.trim())
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ value class NotBlankTrimmedString private constructor(val value: String) {
return NotBlankTrimmedString(raw.trim())
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ suspend fun ktorClientScope(block: suspend KtorClientScope.() -> Unit) {
override val ktorClient: HttpClient = ktorClient
}
ktorClient.use { scope.block() }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ class GitHubIssueNumberTest : FreeSpec({
// then
res.shouldBeRight().value shouldBe "2763"
}
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ class GitHubLabelNameTest : FreeSpec({
// then
res.shouldBeRight().value shouldBe "devexp"
}
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ class GitHubPATTest : FreeSpec({
// then
res.shouldBeRight().value shouldBe "abc"
}
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ class GitHubUsernameTest : FreeSpec({
// then
res.shouldBeRight().value shouldBe "ILIYANGERMANOV"
}
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ class NotBlankTrimmedStringTest : FreeSpec({
// then
res.shouldBeRight().value shouldBe "abc"
}
})
})
2 changes: 1 addition & 1 deletion automations/issue-assign/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ application {

dependencies {
implementation(projects.automations.base)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ private fun StringBuilder.warn(user: GitHubUser) {
private fun StringBuilder.readContributingMd() {
append("\n\n")
append("Also, make sure to read our [Contribution Guidelines](${Constants.CONTRIBUTING_URL}).")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ private fun Map<String, String>.ensureArgument(key: String): String {
"Argument '$key' is missing."
}
return value
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ fun analyzeCommentIntention(comment: GitHubComment): CommentIntention {

else -> CommentIntention.Unknown
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ object Constants {

const val ISSUES_URL = "https://github.com/Ivy-Apps/ivy-wallet/issues"
const val CONTRIBUTING_URL = "https://github.com/Ivy-Apps/ivy-wallet/blob/main/CONTRIBUTING.md"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ private suspend fun checkLabelsForApproved(

val isApproved = labels.any { it.name.value == "approved" }
isApproved
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ private suspend fun execute(argsArr: Array<String>): Either<String, String> = ei
is Action.NotApproved -> action.execute(args).bind()
is Action.DoNothing -> "Do nothing."
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,4 @@ class ActionExecutorTest : FreeSpec({
}
}
}
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ class ArgsParserTest : FreeSpec({
issueNumber = GitHubIssueNumber("123")
)
}
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CommentAnalyzerTest : FreeSpec({
row("I am on it", CommentIntention.TakeIssue(user)),
row(
"yeah i am on it, also i wanted to ask " +
"what resources should i use learn android",
"what resources should i use learn android",
CommentIntention.TakeIssue(user)
),
row("want to contribute", CommentIntention.Unknown),
Expand All @@ -63,8 +63,8 @@ class CommentAnalyzerTest : FreeSpec({
),
row(
"Hi @ILIYANGERMANOV, Assign this issue to me." +
"I think i will require some help in it from your side, " +
"so please bear with me.\n",
"I think i will require some help in it from your side, " +
"so please bear with me.\n",
CommentIntention.Unknown
),
row(
Expand All @@ -82,4 +82,4 @@ class CommentAnalyzerTest : FreeSpec({
intention shouldBe expectedIntention
}
}
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,4 @@ class DetermineActionTest : FreeSpec({
}
}
}
})
})
1 change: 0 additions & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ dependencies {
implementation(libs.ksp.plugin)
implementation(libs.cashapp.molecule.plugin)


// Make version catalog available in precompiled scripts
// https://github.com/gradle/gradle/issues/15383#issuecomment-1567461389
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/ivy.compose.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ dependencies {
implementation(libs.bundles.compose)

lintChecks(libs.slack.lint.compose)
}
}
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/ivy.feature.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
plugins {
id("ivy.module")
id("ivy.compose")
}
}
Loading

0 comments on commit 5160d09

Please sign in to comment.