From 084d62267a8d2bfb0b0a603e0a29be8009d8fd8f Mon Sep 17 00:00:00 2001 From: Jonathan Klee Date: Mon, 4 Dec 2023 12:37:03 +0100 Subject: [PATCH] Do not count private methods in detekt Do not count private methods in dtekt for the TooManyFunctions rule. --- app/detekt-baseline.xml | 13 ------------- detekt.yml | 6 ++++++ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/app/detekt-baseline.xml b/app/detekt-baseline.xml index 7813ffbf5..21ad79f51 100644 --- a/app/detekt-baseline.xml +++ b/app/detekt-baseline.xml @@ -169,33 +169,20 @@ TooGenericExceptionThrown:AnonymousLoginManager.kt$AnonymousLoginManager$throw Exception( "Error fetching Anonymous credentials\n" + "Network code: ${response.code}\n" + "Success: ${response.isSuccessful}" + response.errorString.run { if (isNotBlank()) "\nError message: $this" else "" } ) TooGenericExceptionThrown:PlayStoreLoginWrapper.kt$PlayStoreLoginWrapper$throw Exception("Validation network code: ${response.code}") TooGenericExceptionThrown:PlayStoreLoginWrapper.kt$PlayStoreLoginWrapper$throw Exception(error) - TooManyFunctions:AppInstallProcessor.kt$AppInstallProcessor - TooManyFunctions:AppPrivacyInfoRepositoryImpl.kt$AppPrivacyInfoRepositoryImpl : IAppPrivacyInfoRepository TooManyFunctions:ApplicationApi.kt$ApplicationApi TooManyFunctions:ApplicationApiImpl.kt$ApplicationApiImpl : ApplicationApi - TooManyFunctions:ApplicationFragment.kt$ApplicationFragment : TimeoutFragment TooManyFunctions:ApplicationListFragment.kt$ApplicationListFragment : TimeoutFragmentApplicationInstaller - TooManyFunctions:ApplicationListRVAdapter.kt$ApplicationListRVAdapter : ListAdapter TooManyFunctions:ApplicationRepository.kt$ApplicationRepository - TooManyFunctions:DownloadManager.kt$DownloadManager TooManyFunctions:FusedManagerImpl.kt$FusedManagerImpl : IFusedManager TooManyFunctions:FusedManagerRepository.kt$FusedManagerRepository - TooManyFunctions:GPlayHttpClient.kt$GPlayHttpClient : IHttpClient - TooManyFunctions:HomeChildRVAdapter.kt$HomeChildRVAdapter : ListAdapter TooManyFunctions:HomeFragment.kt$HomeFragment : TimeoutFragmentApplicationInstaller TooManyFunctions:IFusedManager.kt$IFusedManager TooManyFunctions:LoginData.kt$LoginData - TooManyFunctions:MainActivity.kt$MainActivity : AppCompatActivity TooManyFunctions:MainActivityViewModel.kt$MainActivityViewModel : ViewModel TooManyFunctions:PkgManagerModule.kt$PkgManagerModule - TooManyFunctions:PlayStoreAuthenticator.kt$PlayStoreAuthenticator : StoreAuthenticatorAuthDataValidator - TooManyFunctions:PlayStoreRepositoryImpl.kt$PlayStoreRepositoryImpl : PlayStoreRepository - TooManyFunctions:RetrofitModule.kt$RetrofitModule TooManyFunctions:SearchFragment.kt$SearchFragment : TimeoutFragmentOnQueryTextListenerOnSuggestionListenerApplicationInstaller TooManyFunctions:TimeoutFragment.kt$TimeoutFragment : Fragment TooManyFunctions:UpdatesFragment.kt$UpdatesFragment : TimeoutFragmentApplicationInstaller - TooManyFunctions:UpdatesManagerImpl.kt$UpdatesManagerImpl - TooManyFunctions:UpdatesWorker.kt$UpdatesWorker : CoroutineWorker UnusedParameter:SearchViewModel.kt$SearchViewModel$lifecycleOwner: LifecycleOwner diff --git a/detekt.yml b/detekt.yml index 4f6148616..773174aa0 100644 --- a/detekt.yml +++ b/detekt.yml @@ -13,3 +13,9 @@ style: ForbiddenComment: active: false + +# Complexity rules +complexity: + + TooManyFunctions: + ignorePrivate: true -- GitLab