mirror of
https://github.com/FossifyOrg/File-Manager.git
synced 2025-12-23 15:50:31 -05:00
chore: ignore extra translations and update detekt rules
* chore: ignore extra translations in lint Extra translations are removed automatically by Weblate * chore: update detekt rules More compose-friendly * chore: update lint baselines
This commit is contained in:
@@ -128,6 +128,9 @@ android {
|
||||
|
||||
detekt {
|
||||
baseline = file("detekt-baseline.xml")
|
||||
config.setFrom("$rootDir/detekt.yml")
|
||||
buildUponDefaultConfig = true
|
||||
allRules = false
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -139,4 +142,5 @@ dependencies {
|
||||
implementation(libs.gestureviews)
|
||||
implementation(libs.autofittextview)
|
||||
implementation(libs.zip4j)
|
||||
detektPlugins(libs.compose.detekt)
|
||||
}
|
||||
|
||||
@@ -22,10 +22,6 @@
|
||||
<ID>EmptyFunctionBlock:MimeTypesActivity.kt$MimeTypesActivity${}</ID>
|
||||
<ID>EmptyFunctionBlock:StorageFragment.kt$StorageFragment${}</ID>
|
||||
<ID>LargeClass:ItemsAdapter.kt$ItemsAdapter : MyRecyclerViewAdapterOnPopupTextUpdate</ID>
|
||||
<ID>LongMethod:DecompressActivity.kt$DecompressActivity$private fun fillAllListItems(uri: Uri, callback: () -> Unit)</ID>
|
||||
<ID>LongMethod:ItemsAdapter.kt$ItemsAdapter$@SuppressLint("NewApi") private fun compressPaths(sourcePaths: List<String>, targetPath: String, password: String? = null): Boolean</ID>
|
||||
<ID>LongMethod:MimeTypesActivity.kt$MimeTypesActivity$private fun getProperFileDirItems(callback: (ArrayList<FileDirItem>) -> Unit)</ID>
|
||||
<ID>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, )</ID>
|
||||
<ID>LoopWithTooManyJumpStatements:DecompressActivity.kt$DecompressActivity$while</ID>
|
||||
<ID>LoopWithTooManyJumpStatements:StorageFragment.kt$StorageFragment$do</ID>
|
||||
<ID>MagicNumber:Config.kt$Config$1.2f</ID>
|
||||
@@ -39,15 +35,11 @@
|
||||
<ID>MagicNumber:ItemsAdapter.kt$ItemsAdapter$180</ID>
|
||||
<ID>MagicNumber:ItemsAdapter.kt$ItemsAdapter$4</ID>
|
||||
<ID>MagicNumber:ItemsFragment.kt$ItemsFragment$3</ID>
|
||||
<ID>MagicNumber:Long.kt$1000.0</ID>
|
||||
<ID>MagicNumber:MimeTypesActivity.kt$MimeTypesActivity$1000</ID>
|
||||
<ID>MagicNumber:ReadTextActivity.kt$ReadTextActivity$250</ID>
|
||||
<ID>MagicNumber:ReadTextActivity.kt$ReadTextActivity$50</ID>
|
||||
<ID>MagicNumber:RecentsFragment.kt$RecentsFragment$1000</ID>
|
||||
<ID>MagicNumber:RecentsFragment.kt$RecentsFragment$3</ID>
|
||||
<ID>MagicNumber:RecentsFragment.kt$RecentsFragment$50</ID>
|
||||
<ID>MagicNumber:RootHelpers.kt$RootHelpers.<no name provided>$5</ID>
|
||||
<ID>MagicNumber:StorageFragment.kt$StorageFragment$1000</ID>
|
||||
<ID>MagicNumber:StorageFragment.kt$StorageFragment$100000</ID>
|
||||
<ID>MagicNumber:StorageFragment.kt$StorageFragment$2000</ID>
|
||||
<ID>MagicNumber:StorageFragment.kt$StorageFragment$3</ID>
|
||||
|
||||
@@ -30,21 +30,10 @@
|
||||
errorLine2=" ~~~~">
|
||||
<location
|
||||
file="$HOME/Projects/Fossify/FossifyOrg/File-Manager/gradle/libs.versions.toml"
|
||||
line="21"
|
||||
line="22"
|
||||
column="23"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedAttribute"
|
||||
message="Attribute `localeConfig` is only used in API level 33 and higher (current min is 26)"
|
||||
errorLine1=" android:localeConfig="@xml/locale_config""
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/AndroidManifest.xml"
|
||||
line="25"
|
||||
column="9"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="CustomSplashScreen"
|
||||
message="The application should not provide its own launch screen"
|
||||
@@ -68,14 +57,14 @@
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="GradleDependency"
|
||||
message="A newer version of org.fossify:commons than 3.0.5 is available: 3.1.0"
|
||||
errorLine1="commons = "3.0.5""
|
||||
errorLine2=" ~~~~~~~">
|
||||
id="AndroidGradlePluginVersion"
|
||||
message="A newer version of com.android.application than 8.10.1 is available: 8.11.0"
|
||||
errorLine1="gradlePlugins-agp = "8.10.1""
|
||||
errorLine2=" ~~~~~~~~">
|
||||
<location
|
||||
file="$HOME/Projects/Fossify/FossifyOrg/File-Manager/gradle/libs.versions.toml"
|
||||
line="10"
|
||||
column="11"/>
|
||||
line="19"
|
||||
column="21"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
@@ -85,7 +74,7 @@
|
||||
errorLine2=" ~~~~">
|
||||
<location
|
||||
file="$HOME/Projects/Fossify/FossifyOrg/File-Manager/gradle/libs.versions.toml"
|
||||
line="20"
|
||||
line="21"
|
||||
column="31"/>
|
||||
</issue>
|
||||
|
||||
|
||||
58
detekt.yml
Normal file
58
detekt.yml
Normal file
@@ -0,0 +1,58 @@
|
||||
build:
|
||||
maxIssues: 0
|
||||
weights:
|
||||
complexity: 2
|
||||
LongParameterList: 2
|
||||
style: 1
|
||||
|
||||
processors:
|
||||
active: true
|
||||
exclude:
|
||||
- "FunctionCountProcessor"
|
||||
- "PropertyCountProcessor"
|
||||
|
||||
config:
|
||||
validation: true
|
||||
|
||||
complexity:
|
||||
LongParameterList:
|
||||
active: true
|
||||
functionThreshold: 10
|
||||
constructorThreshold: 8
|
||||
ignoreDefaultParameters: true
|
||||
ignoreAnnotated:
|
||||
- "Composable"
|
||||
LongMethod:
|
||||
active: true
|
||||
threshold: 120
|
||||
ignoreAnnotated:
|
||||
- "Composable"
|
||||
- "Preview"
|
||||
|
||||
style:
|
||||
MagicNumber:
|
||||
active: true
|
||||
ignoreAnnotated: ["Composable"]
|
||||
ignoreEnums: true
|
||||
ignoreNumbers: ["-1", "0", "1", "2", "42", "1000"]
|
||||
MaxLineLength:
|
||||
active: true
|
||||
maxLineLength: 120
|
||||
excludePackageStatements: true
|
||||
excludeImportStatements: true
|
||||
|
||||
naming:
|
||||
FunctionNaming:
|
||||
active: true
|
||||
ignoreAnnotated: ["Composable", "Preview"]
|
||||
functionPattern: "[a-z][A-Za-z0-9]*"
|
||||
|
||||
Compose: # io.nlopez.compose.rules
|
||||
ComposableParametersOrdering:
|
||||
active: true
|
||||
ModifierDefaultValue:
|
||||
active: true
|
||||
MissingModifierDefaultValue:
|
||||
active: true
|
||||
PublicComposablePreview:
|
||||
active: true
|
||||
@@ -3,6 +3,7 @@
|
||||
kotlin = "2.2.0"
|
||||
#Detekt
|
||||
detekt = "1.23.8"
|
||||
detektCompose = "0.4.22"
|
||||
#AndroidX
|
||||
androidx-swiperefreshlayout = "1.1.0"
|
||||
androidx-documentfile = "1.1.0"
|
||||
@@ -26,6 +27,8 @@ app-build-kotlinJVMTarget = "17"
|
||||
#AndroidX
|
||||
androidx-swiperefreshlayout = { module = "androidx.swiperefreshlayout:swiperefreshlayout", version.ref = "androidx-swiperefreshlayout" }
|
||||
androidx-documentfile = { module = "androidx.documentfile:documentfile", version.ref = "androidx-documentfile" }
|
||||
#Compose
|
||||
compose-detekt = { module = "io.nlopez.compose.rules:detekt", version.ref = "detektCompose" }
|
||||
#Fossify
|
||||
fossify-commons = { module = "org.fossify:commons", version.ref = "commons" }
|
||||
#Other
|
||||
|
||||
Reference in New Issue
Block a user