From 4fe5bb78716310f1d66adfff0758ca3c9752cf98 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 17 Jul 2022 00:58:34 +0530 Subject: detekt-baselines: init --- detekt-baselines/app.xml | 146 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 detekt-baselines/app.xml (limited to 'detekt-baselines/app.xml') diff --git a/detekt-baselines/app.xml b/detekt-baselines/app.xml new file mode 100644 index 00000000..0f5ba452 --- /dev/null +++ b/detekt-baselines/app.xml @@ -0,0 +1,146 @@ + + + + + ComplexCondition:AutofillFilterView.kt$AutofillFilterView$(list.isEmpty() && rvPasswordSwitcher.nextView.id == rvPasswordEmpty.id) || (list.isNotEmpty() && rvPasswordSwitcher.nextView.id == rvPassword.id) + ComplexCondition:BaseGitActivity.kt$BaseGitActivity$(rootCause is org.eclipse.jgit.errors.TransportException || rootCause is org.eclipse.jgit.api.errors.TransportException || rootCause is org.eclipse.jgit.api.errors.InvalidRemoteException || (rootCause is UserAuthException && rootCause.message == "Exhausted available authentication methods")) + ComplexCondition:GitServerConfigActivity.kt$GitServerConfigActivity$localDir.exists() && localDirFiles.isNotEmpty() && !(localDirFiles.size == 1 && localDirFiles[0].name == ".git") + ComplexCondition:PasswordCreationActivity.kt$PasswordCreationActivity$(!editing || (editing && suggestedName != file.nameWithoutExtension)) && file.exists() + ComplexCondition:PasswordStore.kt$PasswordStore$(keyCode == KeyEvent.KEYCODE_SEARCH || keyCode == KeyEvent.KEYCODE_F && event.isCtrlPressed) && !searchItem.isActionViewExpanded + ComplexMethod:AutofillFilterView.kt$AutofillFilterView$private fun bindUI() + ComplexMethod:GitCommandExecutor.kt$GitCommandExecutor$suspend fun execute(): Result<Unit, Throwable> + ComplexMethod:GitServerConfigActivity.kt$GitServerConfigActivity$override fun onCreate(savedInstanceState: Bundle?) + ComplexMethod:Migrations.kt$private fun migrateToGitUrlBasedConfig(sharedPrefs: SharedPreferences, gitSettings: GitSettings) + ComplexMethod:PasswordCreationActivity.kt$PasswordCreationActivity$override fun onCreate(savedInstanceState: Bundle?) + ComplexMethod:PasswordCreationActivity.kt$PasswordCreationActivity$private fun encrypt() + ComplexMethod:PasswordFragment.kt$PasswordFragment$private fun initializePasswordList() + EmptyDoWhileBlock:PasswordDialog.kt$PasswordDialog${} + EmptyFunctionBlock:BasicBottomSheet.kt$BasicBottomSheet.<no name provided>${} + EmptyFunctionBlock:ItemCreationBottomSheet.kt$ItemCreationBottomSheet.<no name provided>${} + EmptyFunctionBlock:PasswordFragment.kt$PasswordFragment.<no name provided>.<no name provided>${} + ForbiddenComment:Api30AutofillResponseBuilder.kt$Api30AutofillResponseBuilder$// TODO: Support multi-step authentication flows in apps via FLAG_DELAY_SAVE + ForbiddenComment:AutofillResponseBuilder.kt$AutofillResponseBuilder$// TODO: Support multi-step authentication flows in apps via FLAG_DELAY_SAVE + ForbiddenComment:AutofillResponseBuilder.kt$AutofillResponseBuilder.Companion$// FIXME: We should clone the original dataset here and add the credentials to be filled + ForbiddenComment:OreoAutofillService.kt$OreoAutofillService.Companion$// TODO: Provide a user-configurable denylist + ImplicitDefaultLocale:PasswordExportService.kt$PasswordExportService$String.format("%tFT%<tRZ", Calendar.getInstance(TimeZone.getTimeZone("Z"))) + LongMethod:AutofillFilterView.kt$AutofillFilterView$private fun bindUI() + LongMethod:CredentialFinder.kt$CredentialFinder$override fun askForPassword(cont: Continuation<String?>, isRetry: Boolean) + LongMethod:GeneralSettings.kt$GeneralSettings$override fun provideSettings(builder: PreferenceScreen.Builder) + LongMethod:GitCommandExecutor.kt$GitCommandExecutor$suspend fun execute(): Result<Unit, Throwable> + LongMethod:GitServerConfigActivity.kt$GitServerConfigActivity$override fun onCreate(savedInstanceState: Bundle?) + LongMethod:GitServerConfigActivity.kt$GitServerConfigActivity$private fun cloneRepository() + LongMethod:PasswordCreationActivity.kt$PasswordCreationActivity$override fun onCreate(savedInstanceState: Bundle?) + LongMethod:PasswordCreationActivity.kt$PasswordCreationActivity$private fun encrypt() + LongMethod:PasswordFragment.kt$PasswordFragment$private fun initializePasswordList() + LongMethod:RepositorySettings.kt$RepositorySettings$override fun provideSettings(builder: PreferenceScreen.Builder) + LoopWithTooManyJumpStatements:AutofillMatcher.kt$AutofillMatcher.Companion$for ((key, value) in prefs.all) { if (!key.startsWith(PREFERENCE_PREFIX_MATCHES)) continue // We know that preferences starting with `PREFERENCE_PREFIX_MATCHES` were // created with `putStringSet`. @Suppress("UNCHECKED_CAST") val oldMatches = value as? Set<String> if (oldMatches == null) { logcat(WARN) { "Failed to read matches for $key" } continue } // Delete all matches for file locations that are going to be overwritten, then // transfer matches over to the files at their new locations. val newMatches = oldMatches .asSequence() .minus(deletePathList) .minus(oldNewPathMap.values) .map { match -> val newPath = oldNewPathMap[match] ?: return@map match logcat { "Updating match for $key: $match --> $newPath" } newPath } .toSet() if (newMatches != oldMatches) prefs.edit { putStringSet(key, newMatches) } } + LoopWithTooManyJumpStatements:ErrorMessages.kt$ErrorMessages$while (cause.cause != null) { if (cause is GitException) break val nextCause = cause.cause!! if (nextCause is RemoteException) break cause = nextCause } + MagicNumber:AndroidExtensions.kt$26 + MagicNumber:Api30AutofillResponseBuilder.kt$Api30AutofillResponseBuilder$30 + MagicNumber:AutofillDecryptActivity.kt$AutofillDecryptActivity$26 + MagicNumber:AutofillDecryptActivity.kt$AutofillDecryptActivity.Companion$31 + MagicNumber:AutofillFilterView.kt$AutofillFilterView$26 + MagicNumber:AutofillFilterView.kt$AutofillFilterView.Companion$31 + MagicNumber:AutofillPreferences.kt$DirectoryStructure$26 + MagicNumber:AutofillPublisherChangedActivity.kt$AutofillPublisherChangedActivity$26 + MagicNumber:AutofillPublisherChangedActivity.kt$AutofillPublisherChangedActivity.Companion$31 + MagicNumber:AutofillResponseBuilder.kt$AutofillResponseBuilder$26 + MagicNumber:AutofillResponseBuilder.kt$AutofillResponseBuilder$28 + MagicNumber:AutofillResponseBuilder.kt$AutofillResponseBuilder.Companion$28 + MagicNumber:AutofillSaveActivity.kt$AutofillSaveActivity$26 + MagicNumber:AutofillSettings.kt$AutofillSettings$26 + MagicNumber:AutofillViewUtils.kt$30 + MagicNumber:AutofillViewUtils.kt$31 + MagicNumber:BasePgpActivity.kt$BasePgpActivity$26 + MagicNumber:BasePgpActivity.kt$BasePgpActivity$45 + MagicNumber:ClipboardService.kt$ClipboardService$1000 + MagicNumber:ClipboardService.kt$ClipboardService$1000L + MagicNumber:ClipboardService.kt$ClipboardService$23 + MagicNumber:ClipboardService.kt$ClipboardService$24 + MagicNumber:ClipboardService.kt$ClipboardService$26 + MagicNumber:ClipboardService.kt$ClipboardService$31 + MagicNumber:ClipboardService.kt$ClipboardService$45 + MagicNumber:ClipboardService.kt$ClipboardService$500 + MagicNumber:DicewareModule.kt$DicewareModule$6 + MagicNumber:DicewarePasswordGeneratorDialogFragment.kt$DicewarePasswordGeneratorDialogFragment$5 + MagicNumber:Extensions.kt$1000 + MagicNumber:GeneralSettings.kt$GeneralSettings$25 + MagicNumber:GitConfigActivity.kt$GitConfigActivity$0.5f + MagicNumber:GitConfigActivity.kt$GitConfigActivity$500 + MagicNumber:GitConfigActivity.kt$GitConfigActivity$8 + MagicNumber:GitLogAdapter.kt$8 + MagicNumber:GitServerConfigActivity.kt$GitServerConfigActivity$500 + MagicNumber:LaunchActivity.kt$LaunchActivity$500L + MagicNumber:MiscSettings.kt$MiscSettings$26 + MagicNumber:OreoAutofillService.kt$OreoAutofillService$26 + MagicNumber:OreoAutofillService.kt$OreoAutofillService$28 + MagicNumber:OreoAutofillService.kt$OreoAutofillService$30 + MagicNumber:PasswordCreationActivity.kt$PasswordCreationActivity$28 + MagicNumber:PasswordExportService.kt$PasswordExportService$1024 + MagicNumber:PasswordExportService.kt$PasswordExportService$26 + MagicNumber:PasswordFragment.kt$PasswordFragment.<no name provided>$100 + MagicNumber:PasswordFragment.kt$PasswordFragment.<no name provided>$90f + MagicNumber:PasswordGeneratorDialogFragment.kt$PasswordGeneratorDialogFragment$20 + MagicNumber:PasswordItemRecyclerAdapter.kt$PasswordItemRecyclerAdapter.PasswordItemViewHolder$0.7f + MagicNumber:ProxySelectorActivity.kt$ProxySelectorActivity$29 + MagicNumber:ProxySelectorActivity.kt$ProxySelectorActivity$500 + MagicNumber:RepositorySettings.kt$RepositorySettings$25 + MagicNumber:ShortcutHandler.kt$ShortcutHandler$25 + MagicNumber:ShortcutHandler.kt$ShortcutHandler$26 + MagicNumber:SshKey.kt$SshKey$100_000 + MagicNumber:SshKey.kt$SshKey$15 + MagicNumber:SshKey.kt$SshKey$28 + MagicNumber:SshKey.kt$SshKey$30 + MagicNumber:SshKey.kt$SshKey.Algorithm.Ecdsa$256 + MagicNumber:SshKey.kt$SshKey.Algorithm.Ecdsa$28 + MagicNumber:SshKey.kt$SshKey.Algorithm.Rsa$3072 + MagicNumber:SshjSessionFactory.kt$SshjSession$22 + MagicNumber:UriTotpFinder.kt$UriTotpFinder$30 + MatchingDeclarationName:AutofillViewUtils.kt$DatasetMetadata + MaxLineLength:BaseGitActivity.kt$BaseGitActivity$"The server does not support multiple Git operations per SSH session. Please try again, a slower fallback mode will be used." + MaxLineLength:BaseGitActivity.kt$BaseGitActivity$"WARNING: The remote host key has changed. If this is expected, please go to Git server settings and clear the saved host key." + MaxLineLength:UriTotpFinderTest.kt$UriTotpFinderTest.Companion$"otpauth://totp/ACME%20Co:john@example.com?secret=HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ&issuer=ACME%20Co&algorithm=SHA256&digits=12&period=25" + NestedBlockDepth:FieldItemAdapter.kt$FieldItemAdapter.FieldItemViewHolder$fun bind(fieldItem: FieldItem, showPassword: Boolean, copyTextToClipboard: (String?) -> Unit) + NestedBlockDepth:GitOperation.kt$GitOperation$suspend fun executeAfterAuthentication(authMode: AuthMode): Result<Unit, Throwable> + NestedBlockDepth:PasswordExportService.kt$PasswordExportService$override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int + ReturnCount:Api30AutofillResponseBuilder.kt$Api30AutofillResponseBuilder$private fun makeFillOtpFromSmsDataset( context: Context, imeSpec: InlinePresentationSpec? ): Dataset? + ReturnCount:Api30AutofillResponseBuilder.kt$Api30AutofillResponseBuilder$private fun makeSaveInfo(): SaveInfo? + ReturnCount:AutofillDecryptActivity.kt$AutofillDecryptActivity$private suspend fun decryptCredential(file: File, password: String): Credentials? + ReturnCount:AutofillResponseBuilder.kt$AutofillResponseBuilder$private fun makeFillOtpFromSmsDataset(context: Context): Dataset? + ReturnCount:AutofillResponseBuilder.kt$AutofillResponseBuilder$private fun makeSaveInfo(): SaveInfo? + ReturnCount:AutofillViewUtils.kt$@SuppressLint("RestrictedApi") fun makeInlinePresentation( context: Context, imeSpec: InlinePresentationSpec, metadata: DatasetMetadata ): InlinePresentation? + ReturnCount:BaseGitActivity.kt$BaseGitActivity$suspend fun launchGitOperation(operation: GitOp): Result<Unit, Throwable> + ReturnCount:ClipboardService.kt$ClipboardService$override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int + ReturnCount:Extensions.kt$fun File.contains(other: File): Boolean + ReturnCount:GitOperation.kt$GitOperation$suspend fun executeAfterAuthentication(authMode: AuthMode): Result<Unit, Throwable> + ReturnCount:GitSettings.kt$GitSettings$fun updateConnectionSettingsIfValid( newAuthMode: AuthMode, newUrl: String, newBranch: String ): UpdateConnectionSettingsResult + ReturnCount:OreoAutofillService.kt$OreoAutofillService$override fun onFillRequest( request: FillRequest, cancellationSignal: CancellationSignal, callback: FillCallback ) + ReturnCount:OreoAutofillService.kt$OreoAutofillService$override fun onSaveRequest(request: SaveRequest, callback: SaveCallback) + ReturnCount:PasswordStore.kt$PasswordStore$override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean + ReturnCount:ShortcutHandler.kt$ShortcutHandler$fun addPinnedShortcut(item: PasswordItem, intent: Intent) + ReturnCount:UriTotpFinder.kt$UriTotpFinder$override fun findSecret(content: String): String? + SpreadOperator:Api30AutofillResponseBuilder.kt$Api30AutofillResponseBuilder$(*ignoredIds.toTypedArray()) + SpreadOperator:AutofillResponseBuilder.kt$AutofillResponseBuilder$(*ignoredIds.toTypedArray()) + SpreadOperator:BreakOutOfDetached.kt$BreakOutOfDetached$( // abort the rebase git.rebase().setOperation(RebaseCommand.Operation.ABORT), *resetCommands, ) + SpreadOperator:BreakOutOfDetached.kt$BreakOutOfDetached$( // reset hard back to our local HEAD git.reset().setMode(ResetCommand.ResetType.HARD), *resetCommands, ) + SpreadOperator:ErrorMessages.kt$GitException$(res, *fmt) + SpreadOperator:ErrorMessages.kt$GitException.PullException$(res, *fmt) + SpreadOperator:ErrorMessages.kt$GitException.PushException$(res, *fmt) + ThrowsCount:GitCommandExecutor.kt$GitCommandExecutor$suspend fun execute(): Result<Unit, Throwable> + ThrowsCount:SshKey.kt$SshKey$fun import(uri: Uri) + TooManyFunctions:PasswordStore.kt$PasswordStore : BaseGitActivity + TooManyFunctions:SearchableRepositoryViewModel.kt$SearchableRepositoryViewModel : AndroidViewModel + TooManyFunctions:SshjConfig.kt$AbstractLogger : Logger + TooManyFunctions:SshjConfig.kt$LogcatLoggerFactory$LogcatLogger : AbstractLogger + UnusedPrivateMember:PasswordStore.kt$PasswordStore$private val directorySelectAction = registerForActivityResult(StartActivityForResult()) { result -> if (result.resultCode == RESULT_OK) { checkLocalRepository() } } + UnusedPrivateMember:PasswordStore.kt$PasswordStore$private val storagePermissionRequest = registerForActivityResult(RequestPermission()) { granted -> if (granted) checkLocalRepository() } + UseCheckOrError:CredentialFinder.kt$CredentialFinder$throw IllegalStateException("Only SshKey and Password connection mode ask for passwords") + UseCheckOrError:FragmentViewBindingDelegate.kt$FragmentViewBindingDelegate$throw IllegalStateException( "Should not attempt to get bindings when Fragment views are destroyed." ) + UseCheckOrError:GitOperation.kt$GitOperation$throw IllegalStateException("Biometric authentication failures should be ignored") + UseCheckOrError:PGPKeyImportActivity.kt$PGPKeyImportActivity$throw IllegalStateException("Failed to open selected file") + UseCheckOrError:SshKey.kt$SshKey$throw IllegalStateException("SSH key does not exist in Keystore") + UseCheckOrError:SshKeyGenActivity.kt$SshKeyGenActivity$throw IllegalStateException("Impossible key type selection") + UtilityClassWithPublicConstructor:AutofillMatcher.kt$AutofillMatcher + WildcardImport:GitOperation.kt$import app.passwordstore.util.auth.BiometricAuthenticator.Result.* + + -- cgit v1.2.3