mirror of
https://github.com/FossifyOrg/Phone.git
synced 2025-12-23 16:07:46 -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:
@@ -129,6 +129,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.eventbus)
|
||||
implementation(libs.libphonenumber)
|
||||
implementation(libs.geocoder)
|
||||
detektPlugins(libs.compose.detekt)
|
||||
}
|
||||
|
||||
@@ -24,33 +24,19 @@
|
||||
<ID>ExplicitItLambdaParameter:FavoritesFragment.kt$FavoritesFragment${ it -> if (context.config.showCallConfirmation) { CallConfirmationDialog(activity as SimpleActivity, (it as Contact).getNameToDisplay()) { activity?.apply { initiateCall(it) { launchCallIntent(it) } } } } else { activity?.apply { initiateCall(it as Contact) { launchCallIntent(it) } } } }</ID>
|
||||
<ID>LargeClass:CallActivity.kt$CallActivity : SimpleActivity</ID>
|
||||
<ID>LongMethod:CallActivity.kt$CallActivity$@SuppressLint("ClickableViewAccessibility") private fun handleSwipe()</ID>
|
||||
<ID>LongMethod:CallActivity.kt$CallActivity$private fun initButtons()</ID>
|
||||
<ID>LongMethod:CallNotificationManager.kt$CallNotificationManager$@SuppressLint("NewApi") fun setupNotification(forceLowPriority: Boolean = false)</ID>
|
||||
<ID>LongMethod:ContactsAdapter.kt$ContactsAdapter$@SuppressLint("ClickableViewAccessibility") private fun setupView(binding: ItemViewBinding, contact: Contact, holder: ViewHolder)</ID>
|
||||
<ID>LongMethod:DialpadActivity.kt$DialpadActivity$override fun onCreate(savedInstanceState: Bundle?)</ID>
|
||||
<ID>LongMethod:RecentCallsAdapter.kt$RecentCallsAdapter$private fun showPopupMenu(view: View, call: RecentCall)</ID>
|
||||
<ID>LongMethod:RecentCallsAdapter.kt$RecentCallsAdapter.RecentCallViewHolder$fun bind(call: RecentCall)</ID>
|
||||
<ID>LongMethod:RecentsHelper.kt$RecentsHelper$@SuppressLint("NewApi") private fun getRecents( contacts: List<Contact>, selection: String? = null, selectionParams: Array<String>? = null, ): List<RecentCall></ID>
|
||||
<ID>LongParameterList:ContactsAdapter.kt$ContactsAdapter$( activity: SimpleActivity, var contacts: MutableList<Contact>, recyclerView: MyRecyclerView, highlightText: String = "", private val refreshItemsListener: RefreshItemsListener? = null, var viewType: Int = VIEW_TYPE_LIST, private val showDeleteButton: Boolean = true, private val enableDrag: Boolean = false, private val allowLongClick: Boolean = true, itemClick: (Any) -> Unit, val profileIconClick: ((Any) -> Unit)? = null )</ID>
|
||||
<ID>LongParameterList:RecentCallsAdapter.kt$RecentCallsAdapter$( activity: SimpleActivity, recyclerView: MyRecyclerView, private val refreshItemsListener: RefreshItemsListener?, private val showOverflowMenu: Boolean, private val itemDelete: (List<RecentCall>) -> Unit = {}, itemClick: (Any) -> Unit, val profileIconClick: ((Any) -> Unit)? = null )</ID>
|
||||
<ID>MagicNumber:Activity.kt$1000000</ID>
|
||||
<ID>MagicNumber:Call.kt$1000</ID>
|
||||
<ID>MagicNumber:CallActivity.kt$CallActivity$0.10f</ID>
|
||||
<ID>MagicNumber:CallActivity.kt$CallActivity$0.2f</ID>
|
||||
<ID>MagicNumber:CallActivity.kt$CallActivity$0.5f</ID>
|
||||
<ID>MagicNumber:CallActivity.kt$CallActivity$1000</ID>
|
||||
<ID>MagicNumber:CallActivity.kt$CallActivity$1000L</ID>
|
||||
<ID>MagicNumber:CallActivity.kt$CallActivity$200L</ID>
|
||||
<ID>MagicNumber:CallActivity.kt$CallActivity$250L</ID>
|
||||
<ID>MagicNumber:CallActivity.kt$CallActivity$3000</ID>
|
||||
<ID>MagicNumber:CallActivity.kt$CallActivity$5</ID>
|
||||
<ID>MagicNumber:CallActivity.kt$CallActivity$50f</ID>
|
||||
<ID>MagicNumber:CallActivity.kt$CallActivity$60</ID>
|
||||
<ID>MagicNumber:CallActivity.kt$CallActivity.<no name provided>$1000</ID>
|
||||
<ID>MagicNumber:CallLogItem.kt$CallLogItem$1000L</ID>
|
||||
<ID>MagicNumber:CallNotificationManager.kt$CallNotificationManager$42</ID>
|
||||
<ID>MagicNumber:Config.kt$Config$9</ID>
|
||||
<ID>MagicNumber:DialpadActivity.kt$DialpadActivity$1000</ID>
|
||||
<ID>MagicNumber:DialpadActivity.kt$DialpadActivity$3</ID>
|
||||
<ID>MagicNumber:DialpadActivity.kt$DialpadActivity$4</ID>
|
||||
<ID>MagicNumber:DialpadActivity.kt$DialpadActivity$5</ID>
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
errorLine1="app-build-targetSDK = "34""
|
||||
errorLine2=" ~~~~">
|
||||
<location
|
||||
file="$HOME/work/Phone/Phone/gradle/libs.versions.toml"
|
||||
line="20"
|
||||
file="$HOME/Projects/Fossify/FossifyOrg/Phone/gradle/libs.versions.toml"
|
||||
line="21"
|
||||
column="23"/>
|
||||
</issue>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
errorLine1="distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="$HOME/work/Phone/Phone/gradle/wrapper/gradle-wrapper.properties"
|
||||
file="$HOME/Projects/Fossify/FossifyOrg/Phone/gradle/wrapper/gradle-wrapper.properties"
|
||||
line="3"
|
||||
column="17"/>
|
||||
</issue>
|
||||
@@ -95,8 +95,8 @@
|
||||
errorLine1="gradlePlugins-agp = "8.10.1""
|
||||
errorLine2=" ~~~~~~~~">
|
||||
<location
|
||||
file="$HOME/work/Phone/Phone/gradle/libs.versions.toml"
|
||||
line="13"
|
||||
file="$HOME/Projects/Fossify/FossifyOrg/Phone/gradle/libs.versions.toml"
|
||||
line="14"
|
||||
column="21"/>
|
||||
</issue>
|
||||
|
||||
@@ -106,8 +106,8 @@
|
||||
errorLine1="app-build-compileSDKVersion = "34""
|
||||
errorLine2=" ~~~~">
|
||||
<location
|
||||
file="$HOME/work/Phone/Phone/gradle/libs.versions.toml"
|
||||
line="19"
|
||||
file="$HOME/Projects/Fossify/FossifyOrg/Phone/gradle/libs.versions.toml"
|
||||
line="20"
|
||||
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
|
||||
@@ -5,6 +5,7 @@ kotlin = "2.2.0"
|
||||
kotlinxSerializationJson = "1.8.1"
|
||||
#Detekt
|
||||
detekt = "1.23.8"
|
||||
detektCompose = "0.4.22"
|
||||
#Eventbus
|
||||
eventbus = "3.3.1"
|
||||
#Fossify
|
||||
@@ -22,6 +23,8 @@ app-build-minimumSDK = "26"
|
||||
app-build-javaVersion = "VERSION_17"
|
||||
app-build-kotlinJVMTarget = "17"
|
||||
[libraries]
|
||||
#Compose
|
||||
compose-detekt = { module = "io.nlopez.compose.rules:detekt", version.ref = "detektCompose" }
|
||||
#Fossify
|
||||
fossify-commons = { module = "org.fossify:commons", version.ref = "commons" }
|
||||
#EventBus
|
||||
|
||||
Reference in New Issue
Block a user