From 1b9439d0fc1a24f010bd7102e4653625cfeeffa5 Mon Sep 17 00:00:00 2001 From: Jonathan Klee Date: Wed, 20 Sep 2023 12:07:52 +0200 Subject: [PATCH 1/2] Force ktlint to be run on MR --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c104f7f7d..bc6ace1b7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -130,6 +130,9 @@ lintRelease: ktlintRelease: extends: .lintReleaseDefault + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: always script: - ./gradlew app:ktlintCheck --info artifacts: -- GitLab From c88b51ca7b467b3774366f10bce7095c30a45a3b Mon Sep 17 00:00:00 2001 From: Jonathan Klee Date: Wed, 20 Sep 2023 12:08:09 +0200 Subject: [PATCH 2/2] Fix ktlint errors --- app/src/test/java/foundation/e/apps/UpdateManagerImptTest.kt | 1 - .../test/java/foundation/e/apps/login/LoginViewModelTest.kt | 2 +- app/src/test/java/foundation/e/apps/util/FakeCall.kt | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/test/java/foundation/e/apps/UpdateManagerImptTest.kt b/app/src/test/java/foundation/e/apps/UpdateManagerImptTest.kt index 8bf8335f7..b7a4c8ed7 100644 --- a/app/src/test/java/foundation/e/apps/UpdateManagerImptTest.kt +++ b/app/src/test/java/foundation/e/apps/UpdateManagerImptTest.kt @@ -18,7 +18,6 @@ package foundation.e.apps import android.content.Context -import android.content.pm.ApplicationInfo import androidx.arch.core.executor.testing.InstantTaskExecutorRule import com.aurora.gplayapi.data.models.AuthData import foundation.e.apps.data.blockedApps.BlockedAppRepository diff --git a/app/src/test/java/foundation/e/apps/login/LoginViewModelTest.kt b/app/src/test/java/foundation/e/apps/login/LoginViewModelTest.kt index 01521a1ff..662ede447 100644 --- a/app/src/test/java/foundation/e/apps/login/LoginViewModelTest.kt +++ b/app/src/test/java/foundation/e/apps/login/LoginViewModelTest.kt @@ -67,4 +67,4 @@ class LoginViewModelTest { assert(invalidGplayAuth != null) assert((invalidGplayAuth as AuthObject.GPlayAuth).result.isUnknownError()) } -} \ No newline at end of file +} diff --git a/app/src/test/java/foundation/e/apps/util/FakeCall.kt b/app/src/test/java/foundation/e/apps/util/FakeCall.kt index 1c6aa71d8..c05e9487a 100644 --- a/app/src/test/java/foundation/e/apps/util/FakeCall.kt +++ b/app/src/test/java/foundation/e/apps/util/FakeCall.kt @@ -23,7 +23,6 @@ import okhttp3.Callback import okhttp3.Protocol import okhttp3.Request import okhttp3.Response -import okhttp3.ResponseBody import okhttp3.ResponseBody.Companion.toResponseBody import okio.Timeout @@ -76,4 +75,4 @@ class FakeCall : Call { override fun timeout(): Timeout { TODO("Not yet implemented") } -} \ No newline at end of file +} -- GitLab