diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000..36adc78e --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,9 @@ +name: PR + +on: + pull_request: + branches: [ master ] + +jobs: + call-pr-workflow: + uses: FossifyOrg/.github/.github/workflows/pr.yml@main diff --git a/.github/workflows/testing-build.yml b/.github/workflows/testing-build.yml new file mode 100644 index 00000000..33379f92 --- /dev/null +++ b/.github/workflows/testing-build.yml @@ -0,0 +1,10 @@ +name: Testing build (on PR) + +on: + pull_request: + branches: [ master ] + types: [ labeled, opened, synchronize, reopened ] + +jobs: + call-testing-build-workflow: + uses: FossifyOrg/.github/.github/workflows/testing-build.yml@main diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 428514a5..15aca465 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -6,6 +6,7 @@ import java.io.FileInputStream plugins { alias(libs.plugins.android) alias(libs.plugins.kotlinAndroid) + alias(libs.plugins.detekt) } val keystorePropertiesFile: File = rootProject.file("keystore.properties") @@ -89,10 +90,16 @@ android { lint { checkReleaseBuilds = false - abortOnError = false + abortOnError = true + warningsAsErrors = true + baseline = file("lint-baseline.xml") } } +detekt { + baseline = file("detekt-baseline.xml") +} + dependencies { implementation(libs.fossify.commons) implementation(libs.androidx.documentfile) diff --git a/app/detekt-baseline.xml b/app/detekt-baseline.xml new file mode 100644 index 00000000..a20693d5 --- /dev/null +++ b/app/detekt-baseline.xml @@ -0,0 +1,222 @@ + + + + + ComplexCondition:Activity.kt$(hide && filename.startsWith('.')) || (!hide && !filename.startsWith('.')) + ComplexCondition:ItemsAdapter.kt$ItemsAdapter$activity.getDoesFilePathExist(source) && activity.getIsPathDirectory(source) && sourceFile.list()?.isEmpty() == true && sourceFile.getProperSize(true) == 0L && sourceFile.getFileCount(true) == 0 + ComplexCondition:ItemsAdapter.kt$ItemsAdapter$hasOTGConnected && itemToLoad is String && activity.isPathOnOTG(itemToLoad) && baseConfig.OTGTreeUri.isNotEmpty() && baseConfig.OTGPartition.isNotEmpty() + ComplexCondition:MainActivity.kt$MainActivity$!config.wasOTGHandled && hasPermission(PERMISSION_WRITE_STORAGE) && hasOTGConnected() && config.OTGPath.isEmpty() + ComplexCondition:MimeTypesActivity.kt$MimeTypesActivity$mimetype != "image" && mimetype != "video" && mimetype != "audio" && mimetype != "text" && !extraAudioMimeTypes.contains(fullMimetype) && !extraDocumentMimeTypes.contains(fullMimetype) && !archiveMimeTypes.contains(fullMimetype) + ComplexCondition:ReadTextActivity.kt$ReadTextActivity$requestCode == SELECT_SAVE_FILE_INTENT && resultCode == Activity.RESULT_OK && resultData != null && resultData.data != null + CyclomaticComplexMethod:DecompressActivity.kt$DecompressActivity$private fun decompressTo(destination: String) + CyclomaticComplexMethod:DecompressActivity.kt$DecompressActivity$private fun fillAllListItems(uri: Uri, callback: () -> Unit) + CyclomaticComplexMethod:ItemsAdapter.kt$ItemsAdapter$@SuppressLint("NewApi") private fun compressPaths(sourcePaths: List<String>, targetPath: String, password: String? = null): Boolean + CyclomaticComplexMethod:ItemsAdapter.kt$ItemsAdapter$override fun actionItemPressed(id: Int) + CyclomaticComplexMethod:MainActivity.kt$MainActivity$private fun setupOptionsMenu() + CyclomaticComplexMethod:MimeTypesActivity.kt$MimeTypesActivity$private fun getProperFileDirItems(callback: (ArrayList<FileDirItem>) -> Unit) + CyclomaticComplexMethod:StorageFragment.kt$StorageFragment$private fun getSizesByMimeType(volumeName: String): HashMap<String, Long> + EmptyCatchBlock:MimeTypesActivity.kt$MimeTypesActivity${ } + EmptyCatchBlock:StorageFragment.kt$StorageFragment${ } + EmptyFunctionBlock:DecompressItemsAdapter.kt$DecompressItemsAdapter${} + EmptyFunctionBlock:MainActivity.kt$MainActivity.<no name provided>${} + EmptyFunctionBlock:ManageFavoritesAdapter.kt$ManageFavoritesAdapter${} + EmptyFunctionBlock:MimeTypesActivity.kt$MimeTypesActivity${} + EmptyFunctionBlock:StorageFragment.kt$StorageFragment${} + LargeClass:ItemsAdapter.kt$ItemsAdapter : MyRecyclerViewAdapterOnPopupTextUpdate + LargeClass:MainActivity.kt$MainActivity : SimpleActivity + LongMethod:DecompressActivity.kt$DecompressActivity$private fun fillAllListItems(uri: Uri, callback: () -> Unit) + LongMethod:ItemsAdapter.kt$ItemsAdapter$@SuppressLint("NewApi") private fun compressPaths(sourcePaths: List<String>, targetPath: String, password: String? = null): Boolean + LongMethod:MimeTypesActivity.kt$MimeTypesActivity$private fun getProperFileDirItems(callback: (ArrayList<FileDirItem>) -> Unit) + LongParameterList:ItemsAdapter.kt$ItemsAdapter$( activity: SimpleActivity, var listItems: MutableList<ListItem>, private val listener: ItemOperationsListener?, recyclerView: MyRecyclerView, private val isPickMultipleIntent: Boolean, private val swipeRefreshLayout: SwipeRefreshLayout?, canHaveIndividualViewType: Boolean = true, itemClick: (Any) -> Unit, ) + LoopWithTooManyJumpStatements:DecompressActivity.kt$DecompressActivity$while + LoopWithTooManyJumpStatements:StorageFragment.kt$StorageFragment$do + MagicNumber:Config.kt$Config$1.2f + MagicNumber:Config.kt$Config$4 + MagicNumber:Config.kt$Config$8 + MagicNumber:DecompressActivity.kt$DecompressActivity$1024 + MagicNumber:DecompressItemsAdapter.kt$DecompressItemsAdapter$0.8f + MagicNumber:DecompressItemsAdapter.kt$DecompressItemsAdapter$180 + MagicNumber:ItemsAdapter.kt$ItemsAdapter$0.8f + MagicNumber:ItemsAdapter.kt$ItemsAdapter$10 + MagicNumber:ItemsAdapter.kt$ItemsAdapter$180 + MagicNumber:ItemsAdapter.kt$ItemsAdapter$4 + MagicNumber:ItemsFragment.kt$ItemsFragment$3 + MagicNumber:Long.kt$1000.0 + MagicNumber:MimeTypesActivity.kt$MimeTypesActivity$1000 + MagicNumber:ReadTextActivity.kt$ReadTextActivity$250 + MagicNumber:ReadTextActivity.kt$ReadTextActivity$50 + MagicNumber:RecentsFragment.kt$RecentsFragment$1000 + MagicNumber:RecentsFragment.kt$RecentsFragment$3 + MagicNumber:RecentsFragment.kt$RecentsFragment$50 + MagicNumber:RootHelpers.kt$RootHelpers.<no name provided>$5 + MagicNumber:StorageFragment.kt$StorageFragment$1000 + MagicNumber:StorageFragment.kt$StorageFragment$100000 + MagicNumber:StorageFragment.kt$StorageFragment$2000 + MagicNumber:StorageFragment.kt$StorageFragment$3 + MagicNumber:StorageFragment.kt$StorageFragment$4096L + MaxLineLength:Activity.kt$fun + MaxLineLength:ChangeViewTypeDialog.kt$ChangeViewTypeDialog$class + MaxLineLength:ChangeViewTypeDialog.kt$ChangeViewTypeDialog$val + MaxLineLength:CompressAsDialog.kt$CompressAsDialog$FilePickerDialog + MaxLineLength:CompressAsDialog.kt$CompressAsDialog$class + MaxLineLength:CompressAsDialog.kt$CompressAsDialog$val indexOfDot = if (filename.contains('.') && !activity.getIsPathDirectory(path)) filename.lastIndexOf(".") else filename.length + MaxLineLength:Config.kt$Config$set(wasStorageAnalysisTabAdded) = prefs.edit().putBoolean(WAS_STORAGE_ANALYSIS_TAB_ADDED, wasStorageAnalysisTabAdded).apply() + MaxLineLength:Context.kt$fun Context.isPathOnRoot(path: String) + MaxLineLength:DecompressActivity.kt$DecompressActivity$binding.decompressToolbar.title = realPath?.getFilenameFromPath() ?: Uri.decode(uri.toString().getFilenameFromPath()) + MaxLineLength:DecompressActivity.kt$DecompressActivity$updateMaterialActivityViews(decompressCoordinator, decompressList, useTransparentNavigation = true, useTopSearchMenu = false) + MaxLineLength:DecompressItemsAdapter.kt$DecompressItemsAdapter$class + MaxLineLength:DecompressItemsAdapter.kt$DecompressItemsAdapter$val drawable = fileDrawables.getOrElse(fileName.substringAfterLast(".").lowercase(Locale.getDefault()), { fileDrawable }) + MaxLineLength:FavoritesActivity.kt$FavoritesActivity$FilePickerDialog + MaxLineLength:FavoritesActivity.kt$FavoritesActivity$ManageFavoritesAdapter(this@FavoritesActivity, favorites, this@FavoritesActivity, manageFavoritesList) { } + MaxLineLength:FavoritesActivity.kt$FavoritesActivity$updateMaterialActivityViews(manageFavoritesCoordinator, manageFavoritesList, useTransparentNavigation = true, useTopSearchMenu = false) + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$"${baseConfig.OTGTreeUri}/document/${baseConfig.OTGPartition}%3A${itemToLoad.substring(baseConfig.OTGPath.length).replace("/", "%2F")}" + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$(drawable as LayerDrawable).findDrawableByLayerId(R.id.shortcut_folder_background).applyColorFilter(appIconColor) + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$File(path).listFiles()?.filter { if (shouldShowHidden) true else !it.name.startsWith('.') } + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$activity.getDocumentFile(path)?.listFiles()?.filter { if (shouldShowHidden) true else !it.name!!.startsWith(".") } + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$if + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$intent.flags = intent.flags or Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NO_HISTORY + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$itemName?.text = if (textToHighlight.isEmpty()) fileName else fileName.highlightTextPart(textToHighlight, properPrimaryColor) + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$itemSection?.text = if (textToHighlight.isEmpty()) listItem.mName else listItem.mName.highlightTextPart(textToHighlight, properPrimaryColor) + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$name = if (base == currentPath) currentPath.getFilenameFromPath() else mainFilePath.relativizeWith(base) + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$override fun getIsItemSelectable(position: Int) + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$override fun onChange(position: Int) + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$private + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$private fun getSelectedFileDirItems() + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$sourceFile.list()?.isEmpty() == true + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$val currPath = if (entry.isDirectory) path else "${path.getParentPath().trimEnd('/')}/${entry.fileName}" + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$val drawable = fileDrawables.getOrElse(fileName.substringAfterLast(".").lowercase(Locale.getDefault()), { fileDrawable }) + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$val fileDirItem = FileDirItem(currPath, entry.fileName, entry.isDirectory, 0, entry.uncompressedSize) + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$val fileIcon = fileDrawables.getOrElse(path.substringAfterLast(".").lowercase(Locale.getDefault()), { fileDrawable }) + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$val paths = getSelectedFileDirItems().asSequence().filter { !it.isDirectory }.map { it.path }.toMutableList() as ArrayList<String> + MaxLineLength:ItemsAdapter.kt$ItemsAdapter$} + MaxLineLength:ItemsAdapter.kt$ItemsAdapter.Binding.ItemDirGrid$override + MaxLineLength:ItemsAdapter.kt$ItemsAdapter.Binding.ItemEmpty$override + MaxLineLength:ItemsAdapter.kt$ItemsAdapter.Binding.ItemFileDirList$override + MaxLineLength:ItemsAdapter.kt$ItemsAdapter.Binding.ItemFileDirList$return ItemFileDirListBindingAdapter(ItemFileDirListBinding.inflate(layoutInflater, viewGroup, attachToRoot)) + MaxLineLength:ItemsAdapter.kt$ItemsAdapter.Binding.ItemFileGrid$override + MaxLineLength:ItemsAdapter.kt$ItemsAdapter.Binding.ItemSection$override + MaxLineLength:ItemsFragment.kt$ItemsFragment$ItemsAdapter + MaxLineLength:ItemsFragment.kt$ItemsFragment$class + MaxLineLength:ItemsFragment.kt$ItemsFragment$context + MaxLineLength:ItemsFragment.kt$ItemsFragment$if + MaxLineLength:ItemsFragment.kt$ItemsFragment$private + MaxLineLength:ItemsFragment.kt$ItemsFragment$val sectionTitle = ListItem(it.path, context!!.humanizePath(it.path), true, 0, 0, 0, true, false) + MaxLineLength:ItemsFragment.kt$ItemsFragment$val sectionTitle = ListItem(parent, context!!.humanizePath(parent), false, 0, 0, 0, true, false) + MaxLineLength:ItemsFragment.kt$ItemsFragment.<no name provided>$return + MaxLineLength:ListItem.kt$ListItem$val mPath: String + MaxLineLength:MainActivity.kt$MainActivity$// used at apps that have no file access at all, but need to work with files. For example Simple Calendar uses this at exporting events into a file + MaxLineLength:MainActivity.kt$MainActivity$findItem(R.id.add_favorite).isVisible = currentFragment is ItemsFragment && !favorites.contains(currentFragment.currentPath) + MaxLineLength:MainActivity.kt$MainActivity$findItem(R.id.column_count).isVisible = currentViewType == VIEW_TYPE_GRID && currentFragment !is StorageFragment + MaxLineLength:MainActivity.kt$MainActivity$findItem(R.id.go_home).isVisible = currentFragment is ItemsFragment && currentFragment.currentPath != config.homeFolder + MaxLineLength:MainActivity.kt$MainActivity$findItem(R.id.remove_favorite).isVisible = currentFragment is ItemsFragment && favorites.contains(currentFragment.currentPath) + MaxLineLength:MainActivity.kt$MainActivity$findItem(R.id.set_as_home).isVisible = currentFragment is ItemsFragment && currentFragment.currentPath != config.homeFolder + MaxLineLength:MainActivity.kt$MainActivity$findItem(R.id.stop_showing_hidden).isVisible = config.temporarilyShowHidden && currentFragment !is StorageFragment + MaxLineLength:MainActivity.kt$MainActivity$findItem(R.id.temporarily_show_hidden).isVisible = !config.shouldShowHidden() && currentFragment !is StorageFragment + MaxLineLength:MainActivity.kt$MainActivity$findItem(R.id.toggle_filename).isVisible = currentViewType == VIEW_TYPE_GRID && currentFragment !is StorageFragment + MaxLineLength:MainActivity.kt$MainActivity$getStorageDirectories().firstOrNull { it.trimEnd('/') != internalStoragePath && it.trimEnd('/') != sdCardPath } + MaxLineLength:MainActivity.kt$MainActivity$if + MaxLineLength:MainActivity.kt$MainActivity$private fun getInactiveTabIndexes(activeIndex: Int) + MaxLineLength:MainActivity.kt$MainActivity$resultIntent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION or Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION + MaxLineLength:MainActivity.kt$MainActivity$updateMaterialActivityViews(binding.mainCoordinator, null, useTransparentNavigation = false, useTopSearchMenu = true) + MaxLineLength:MainActivity.kt$MainActivity$val isPickFileIntent = action == RingtoneManager.ACTION_RINGTONE_PICKER || action == Intent.ACTION_GET_CONTENT || action == Intent.ACTION_PICK + MaxLineLength:MainActivity.kt$MainActivity$val licenses = LICENSE_GLIDE or LICENSE_PATTERN or LICENSE_REPRINT or LICENSE_GESTURE_VIEWS or LICENSE_AUTOFITTEXTVIEW or LICENSE_ZIP4J + MaxLineLength:MimeTypesActivity.kt$MimeTypesActivity$!extraAudioMimeTypes.contains(fullMimetype) + MaxLineLength:MimeTypesActivity.kt$MimeTypesActivity$if + MaxLineLength:MimeTypesActivity.kt$MimeTypesActivity$updateMaterialActivityViews(mimetypesCoordinator, mimetypesList, useTransparentNavigation = true, useTopSearchMenu = false) + MaxLineLength:MimeTypesActivity.kt$MimeTypesActivity$val fullMimetype = cursor.getStringValue(MediaStore.Files.FileColumns.MIME_TYPE)?.lowercase(Locale.getDefault()) ?: return@queryCursor + MaxLineLength:MyViewPagerFragment.kt$MyViewPagerFragment$abstract + MaxLineLength:MyViewPagerFragment.kt$MyViewPagerFragment$val fabIcon = context.resources.getColoredDrawableWithColor(iconId, context.getProperPrimaryColor().getContrastColor()) + MaxLineLength:ReadTextActivity.kt$ReadTextActivity$if + MaxLineLength:ReadTextActivity.kt$ReadTextActivity$private + MaxLineLength:ReadTextActivity.kt$ReadTextActivity$updateMaterialActivityViews(readTextCoordinator, readTextView, useTransparentNavigation = true, useTopSearchMenu = false) + MaxLineLength:RecentsFragment.kt$RecentsFragment$ItemsAdapter + MaxLineLength:RecentsFragment.kt$RecentsFragment$binding.recentsSwipeRefresh.isEnabled = lastSearchedText.isEmpty() && activity?.config?.enablePullToRefresh != false + MaxLineLength:RecentsFragment.kt$RecentsFragment$class + MaxLineLength:RecentsFragment.kt$RecentsFragment$if + MaxLineLength:RecentsFragment.kt$RecentsFragment$val filtered = filesIgnoringSearch.filter { it.mName.contains(text, true) }.toMutableList() as ArrayList<ListItem> + MaxLineLength:RootHelpers.kt$RootHelpers$fun + MaxLineLength:RootHelpers.kt$RootHelpers$private + MaxLineLength:SaveAsActivity.kt$SaveAsActivity$FilePickerDialog + MaxLineLength:SaveAsDialog.kt$SaveAsDialog$val title = String.format(activity.getString(R.string.file_already_exists_overwrite), newFilename) + MaxLineLength:SettingsActivity.kt$SettingsActivity$settingsUseEnglishHolder.beVisibleIf((config.wasUseEnglishToggled || Locale.getDefault().language != "en") && !isTiramisuPlus()) + MaxLineLength:SettingsActivity.kt$SettingsActivity$updateMaterialActivityViews(settingsCoordinator, settingsHolder, useTransparentNavigation = true, useTopSearchMenu = false) + MaxLineLength:StorageFragment.kt$StorageFragment$class + MaxLineLength:StorageFragment.kt$StorageFragment$mainStorageUsageProgressbar + MaxLineLength:StorageFragment.kt$StorageFragment$mainStorageUsageProgressbar.progress = ((totalStorageSpace - freeStorageSpace) / SIZE_DIVIDER).toInt() + MaxLineLength:StorageFragment.kt$StorageFragment$totalSpace.text = String.format(context.getString(R.string.total_storage), totalStorageSpace.formatSizeThousand()) + MaxLineLength:StorageFragment.kt$StorageFragment$val filtered = allDeviceListItems.filter { it.mName.contains(text, true) }.toMutableList() as ArrayList<ListItem> + MaxLineLength:StorageFragment.kt$StorageFragment$val mimeType = cursor.getStringValue(MediaStore.Files.FileColumns.MIME_TYPE)?.lowercase(Locale.getDefault()) + MaxLineLength:StorageFragment.kt$StorageFragment$val storageStatsManager = context.getSystemService(AppCompatActivity.STORAGE_STATS_SERVICE) as StorageStatsManager + MaxLineLength:ViewPagerAdapter.kt$ViewPagerAdapter$val isGetContentIntent = activity.intent.action == Intent.ACTION_GET_CONTENT || activity.intent.action == Intent.ACTION_PICK + NestedBlockDepth:DecompressActivity.kt$DecompressActivity$private fun decompressTo(destination: String) + NestedBlockDepth:ItemsAdapter.kt$ItemsAdapter$@SuppressLint("NewApi") private fun compressPaths(sourcePaths: List<String>, targetPath: String, password: String? = null): Boolean + NestedBlockDepth:ItemsAdapter.kt$ItemsAdapter$private fun decompressPaths(paths: List<String>, conflictResolutions: LinkedHashMap<String, Int>, callback: (success: Boolean) -> Unit) + NestedBlockDepth:ItemsAdapter.kt$ItemsAdapter$private fun setupView(binding: ItemViewBinding, listItem: ListItem) + NestedBlockDepth:ItemsAdapter.kt$ItemsAdapter$private fun tryDecompressingPaths(sourcePaths: List<String>, callback: (success: Boolean) -> Unit) + NestedBlockDepth:ItemsFragment.kt$ItemsFragment$private fun getRegularItemsOf(path: String, callback: (originalPath: String, items: ArrayList<ListItem>) -> Unit) + NestedBlockDepth:ItemsFragment.kt$ItemsFragment$private fun searchFiles(text: String, path: String): ArrayList<ListItem> + NestedBlockDepth:RecentsFragment.kt$RecentsFragment$private fun getRecents(callback: (recents: ArrayList<ListItem>) -> Unit) + NestedBlockDepth:StorageFragment.kt$StorageFragment$override fun setupFragment(activity: SimpleActivity) + NestedBlockDepth:StorageFragment.kt$StorageFragment$private fun getAllFiles(volumeName: String): ArrayList<FileDirItem> + ReturnCount:ItemsAdapter.kt$ItemsAdapter$@SuppressLint("NewApi") private fun compressPaths(sourcePaths: List<String>, targetPath: String, password: String? = null): Boolean + SwallowedException:ItemsAdapter.kt$ItemsAdapter$e: Exception + SwallowedException:MimeTypesActivity.kt$MimeTypesActivity$e: Exception + SwallowedException:StorageFragment.kt$StorageFragment$e: Exception + TooGenericExceptionCaught:DecompressActivity.kt$DecompressActivity$e: Exception + TooGenericExceptionCaught:ItemsAdapter.kt$ItemsAdapter$e: Exception + TooGenericExceptionCaught:ItemsAdapter.kt$ItemsAdapter$exception: Exception + TooGenericExceptionCaught:MainActivity.kt$MainActivity$e: Exception + TooGenericExceptionCaught:MimeTypesActivity.kt$MimeTypesActivity$e: Exception + TooGenericExceptionCaught:ReadTextActivity.kt$ReadTextActivity$e: Exception + TooGenericExceptionCaught:RecentsFragment.kt$RecentsFragment$e: Exception + TooGenericExceptionCaught:RootHelpers.kt$RootHelpers$e: Exception + TooGenericExceptionCaught:RootHelpers.kt$RootHelpers$exception: Exception + TooGenericExceptionCaught:SaveAsActivity.kt$SaveAsActivity$e: Exception + TooGenericExceptionCaught:StorageFragment.kt$StorageFragment$e: Exception + TooManyFunctions:DecompressActivity.kt$DecompressActivity : SimpleActivity + TooManyFunctions:DecompressItemsAdapter.kt$DecompressItemsAdapter : MyRecyclerViewAdapter + TooManyFunctions:ItemsAdapter.kt$ItemsAdapter : MyRecyclerViewAdapterOnPopupTextUpdate + TooManyFunctions:ItemsFragment.kt$ItemsFragment : MyViewPagerFragmentItemOperationsListenerBreadcrumbsListener + TooManyFunctions:MainActivity.kt$MainActivity : SimpleActivity + TooManyFunctions:ManageFavoritesAdapter.kt$ManageFavoritesAdapter : MyRecyclerViewAdapter + TooManyFunctions:MimeTypesActivity.kt$MimeTypesActivity : SimpleActivityItemOperationsListener + TooManyFunctions:ReadTextActivity.kt$ReadTextActivity : SimpleActivity + TooManyFunctions:RecentsFragment.kt$RecentsFragment : MyViewPagerFragmentItemOperationsListener + TooManyFunctions:RootHelpers.kt$RootHelpers + TooManyFunctions:SettingsActivity.kt$SettingsActivity : SimpleActivity + TooManyFunctions:StorageFragment.kt$StorageFragment : MyViewPagerFragmentItemOperationsListener + VariableNaming:ItemsAdapter.kt$ItemsAdapter$val SAFPath = getFirstSelectedItemPath() + VariableNaming:RecentsFragment.kt$RecentsFragment$private val RECENTS_LIMIT = 50 + VariableNaming:StorageFragment.kt$StorageFragment$private val SIZE_DIVIDER = 100000 + WildcardImport:Activity.kt$import org.fossify.commons.extensions.* + WildcardImport:Activity.kt$import org.fossify.filemanager.helpers.* + WildcardImport:ChangeSortingDialog.kt$import org.fossify.commons.helpers.* + WildcardImport:CompressAsDialog.kt$import org.fossify.commons.extensions.* + WildcardImport:CreateNewItemDialog.kt$import org.fossify.commons.extensions.* + WildcardImport:DecompressActivity.kt$import org.fossify.commons.extensions.* + WildcardImport:InsertFilenameDialog.kt$import org.fossify.commons.extensions.* + WildcardImport:ItemsAdapter.kt$import org.fossify.commons.dialogs.* + WildcardImport:ItemsAdapter.kt$import org.fossify.commons.extensions.* + WildcardImport:ItemsAdapter.kt$import org.fossify.commons.helpers.* + WildcardImport:ItemsAdapter.kt$import org.fossify.filemanager.databinding.* + WildcardImport:ItemsAdapter.kt$import org.fossify.filemanager.extensions.* + WildcardImport:ItemsAdapter.kt$import org.fossify.filemanager.helpers.* + WildcardImport:ItemsFragment.kt$import org.fossify.commons.extensions.* + WildcardImport:ItemsFragment.kt$import org.fossify.commons.helpers.* + WildcardImport:MainActivity.kt$import org.fossify.commons.extensions.* + WildcardImport:MainActivity.kt$import org.fossify.commons.helpers.* + WildcardImport:ManageFavoritesAdapter.kt$import android.view.* + WildcardImport:MimeTypesActivity.kt$import org.fossify.commons.extensions.* + WildcardImport:MimeTypesActivity.kt$import org.fossify.filemanager.helpers.* + WildcardImport:MyViewPagerFragment.kt$import org.fossify.commons.extensions.* + WildcardImport:ReadTextActivity.kt$import org.fossify.commons.extensions.* + WildcardImport:RecentsFragment.kt$import org.fossify.commons.extensions.* + WildcardImport:SaveAsActivity.kt$import org.fossify.commons.extensions.* + WildcardImport:SaveAsDialog.kt$import org.fossify.commons.extensions.* + WildcardImport:SettingsActivity.kt$import org.fossify.commons.extensions.* + WildcardImport:SettingsActivity.kt$import org.fossify.commons.helpers.* + WildcardImport:StorageFragment.kt$import org.fossify.commons.extensions.* + WildcardImport:StorageFragment.kt$import org.fossify.commons.helpers.* + WildcardImport:StorageFragment.kt$import org.fossify.filemanager.helpers.* + + diff --git a/app/lint-baseline.xml b/app/lint-baseline.xml new file mode 100644 index 00000000..321e2942 --- /dev/null +++ b/app/lint-baseline.xml @@ -0,0 +1,1111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build.gradle.kts b/build.gradle.kts index f0236317..883ff3df 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,5 @@ plugins { alias(libs.plugins.android).apply(false) alias(libs.plugins.kotlinAndroid).apply(false) + alias(libs.plugins.detekt).apply(false) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index adb3bc52..65852a2c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,8 @@ [versions] #jetbrains kotlin = "1.9.10" +#Detekt +detekt = "1.23.3" #AndroidX androidx-swiperefreshlayout = "1.1.0" androidx-documentfile = "1.0.1" @@ -39,3 +41,4 @@ zip4j = { module = "net.lingala.zip4j:zip4j", version.ref = "zip4j" } [plugins] android = { id = "com.android.application", version.ref = "gradlePlugins-agp" } kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }