From 06f7597de04991bd541233f4c57fa5eac964d449 Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Wed, 4 Dec 2024 19:27:00 +0100 Subject: [PATCH] style(detekt): Ignore TooGenericExceptionThrown on test stub implementation Signed-off-by: Andy Scherzinger --- .../nextcloud/talk/contacts/repository/FakeRepositoryError.kt | 2 ++ detekt.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/test/java/com/nextcloud/talk/contacts/repository/FakeRepositoryError.kt b/app/src/test/java/com/nextcloud/talk/contacts/repository/FakeRepositoryError.kt index 725cf9aa9..1cb9b51ac 100644 --- a/app/src/test/java/com/nextcloud/talk/contacts/repository/FakeRepositoryError.kt +++ b/app/src/test/java/com/nextcloud/talk/contacts/repository/FakeRepositoryError.kt @@ -12,10 +12,12 @@ import com.nextcloud.talk.models.json.autocomplete.AutocompleteOverall import com.nextcloud.talk.models.json.conversations.RoomOverall class FakeRepositoryError : ContactsRepository { + @Suppress("Detekt.TooGenericExceptionThrown") override suspend fun getContacts(searchQuery: String?, shareTypes: List): AutocompleteOverall { throw Exception("unable to fetch contacts") } + @Suppress("Detekt.TooGenericExceptionThrown") override suspend fun createRoom( roomType: String, sourceType: String, diff --git a/detekt.yml b/detekt.yml index 7d131971e..62d1c5ea1 100644 --- a/detekt.yml +++ b/detekt.yml @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors # SPDX-License-Identifier: GPL-3.0-or-later build: - maxIssues: 169 + maxIssues: 167 weights: # complexity: 2 # LongParameterList: 1