From 2bc627283b7dbfb793709454fcad4986fb38cada Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Tue, 29 Sep 2026 20:55:22 +0000 Subject: [PATCH] chore(detekt): drop baseline entries that match nothing (#7455) --- androidApp/detekt-baseline.xml | 8 ----- build-logic/convention/detekt-baseline.xml | 37 ---------------------- core/datastore/detekt-baseline.xml | 1 - core/takserver/detekt-baseline.xml | 4 --- core/ui/detekt-baseline.xml | 3 -- desktopApp/detekt-baseline.xml | 6 ---- feature/firmware/detekt-baseline.xml | 6 ---- feature/intro/detekt-baseline.xml | 2 -- feature/node/detekt-baseline.xml | 8 ----- feature/settings/detekt-baseline.xml | 4 --- 10 files changed, 79 deletions(-) delete mode 100644 build-logic/convention/detekt-baseline.xml diff --git a/androidApp/detekt-baseline.xml b/androidApp/detekt-baseline.xml index 870bafdca6..832f8be03f 100644 --- a/androidApp/detekt-baseline.xml +++ b/androidApp/detekt-baseline.xml @@ -4,13 +4,8 @@ ComplexCondition:MapViewModel.kt:MapViewModel$name.isBlank() || (urlTemplate.isBlank() && localUri == null) || (localUri == null && !isValidTileUrlTemplate(urlTemplate)) ComplexCondition:MapViewModel.kt:MapViewModel$normalized.name.isBlank() || (normalized.urlTemplate.isBlank() && normalized.localUri == null) || (normalized.localUri == null && !isValidTileUrlTemplate(normalized.urlTemplate)) - ComposableParamOrder:MapView.kt:@OptIn(ExperimentalMaterial3Api::class) @Composable private fun MapsDialog - CyclomaticComplexMethod:DiscoveryGoogleMap.kt:@OptIn(MapsComposeExperimentalApi::class) @Composable fun DiscoveryGoogleMap - CyclomaticComplexMethod:GeminiNanoDocAssistant.kt:GeminiNanoDocAssistant$override fun answerStream: kotlinx.coroutines.flow.Flow<AIDocAssistantResult> - CyclomaticComplexMethod:GeminiNanoDocAssistant.kt:GeminiNanoDocAssistant$private fun buildContext: ContextResult LongMethod:DiscoveryGoogleMap.kt:@OptIn(MapsComposeExperimentalApi::class) @Composable fun DiscoveryGoogleMap LongMethod:GeminiNanoDocAssistant.kt:GeminiNanoDocAssistant$override fun answerStream: kotlinx.coroutines.flow.Flow<AIDocAssistantResult> - LongMethod:GeminiNanoDocAssistant.kt:GeminiNanoDocAssistant$override suspend fun isSupported: Boolean LongMethod:GeminiNanoDocAssistant.kt:GeminiNanoDocAssistant$private fun buildPrompt: String LoopWithTooManyJumpStatements:GeminiNanoDocAssistant.kt:GeminiNanoDocAssistant$for MatchingDeclarationName:MapView.kt:GoogleMapMode @@ -21,7 +16,6 @@ ReturnCount:MlKitDocTranslator.kt:MlKitDocTranslator$override suspend fun translatePage: TranslationResult ReturnCount:MlKitMessageTranslator.kt:MlKitMessageTranslator$override suspend fun downloadLanguageModels: DownloadResult ReturnCount:MlKitMessageTranslator.kt:MlKitMessageTranslator$override suspend fun translate: TranslationResult - SwallowedException:MapViewModel.kt:MapViewModel$e: Exception ThrowsCount:MeshtasticAppFunctions.kt:MeshtasticAppFunctions$suspend fun getChannelInfo: GetChannelInfoResponse ThrowsCount:MeshtasticAppFunctions.kt:MeshtasticAppFunctions$suspend fun getDeviceStatus: GetDeviceStatusResponse ThrowsCount:MeshtasticAppFunctions.kt:MeshtasticAppFunctions$suspend fun getMeshMetrics: GetMeshMetricsResponse @@ -31,13 +25,11 @@ ThrowsCount:MeshtasticAppFunctions.kt:MeshtasticAppFunctions$suspend fun sendMessage: SendMessageResponse TooGenericExceptionCaught:GeminiNanoDocAssistant.kt:GeminiNanoDocAssistant$e: Exception TooGenericExceptionCaught:MapView.kt:e: Exception - TooGenericExceptionCaught:MapView.kt:ex: Exception TooGenericExceptionCaught:MapViewModel.kt:MapViewModel$e: Exception TooGenericExceptionCaught:MlKitDocTranslator.kt:MlKitDocTranslator$e: Exception TooGenericExceptionCaught:MlKitMessageTranslator.kt:MlKitMessageTranslator$e: Exception TooManyFunctions:GeminiNanoDocAssistant.kt:GeminiNanoDocAssistant : AIDocAssistant TooManyFunctions:MapView.kt:org.meshtastic.app.map.MapView.kt - TooManyFunctions:MapViewModel.kt:MapViewModel : BaseMapViewModel UnnecessaryLaunchedEffect:Main.kt:LaunchedEffect UnnecessaryLaunchedEffect:MapView.kt:LaunchedEffect UnnecessaryLaunchedEffect:TracerouteMap.kt:LaunchedEffect diff --git a/build-logic/convention/detekt-baseline.xml b/build-logic/convention/detekt-baseline.xml deleted file mode 100644 index a7b56b97f3..0000000000 --- a/build-logic/convention/detekt-baseline.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - AbsentOrWrongFileLicense:DetektConventionPlugin.kt$.DetektConventionPlugin.kt - AbsentOrWrongFileLicense:SpotlessConventionPlugin.kt$.SpotlessConventionPlugin.kt - ChainWrapping:AndroidInstrumentedTests.kt$&& - EnumNaming:MeshtasticFlavor.kt$FlavorDimension$marketplace - EnumNaming:MeshtasticFlavor.kt$MeshtasticFlavor$fdroid : MeshtasticFlavor - EnumNaming:MeshtasticFlavor.kt$MeshtasticFlavor$google : MeshtasticFlavor - FinalNewline:ProjectExtensions.kt$com.geeksville.mesh.buildlogic.ProjectExtensions.kt - MagicNumber:AndroidApplicationConventionPlugin.kt$AndroidApplicationConventionPlugin$36 - MagicNumber:AndroidLibraryConventionPlugin.kt$AndroidLibraryConventionPlugin$36 - MagicNumber:KotlinAndroid.kt$21 - MagicNumber:KotlinAndroid.kt$26 - MagicNumber:KotlinAndroid.kt$36 - MagicNumber:Spotless.kt$120 - MaxLineLength:GitVersionValueSource.kt$GitVersionValueSource$throw RuntimeException("Failed to determine git commit count for versionCode. Ensure you have a full git history (not a shallow clone) and .git is present.\nOriginal error: ${e.message}", e) - NewLineAtEndOfFile:ProjectExtensions.kt$com.geeksville.mesh.buildlogic.ProjectExtensions.kt - NoBlankLineBeforeRbrace:AndroidApplicationComposeConventionPlugin.kt$AndroidApplicationComposeConventionPlugin$ - NoBlankLineBeforeRbrace:AndroidLibraryComposeConventionPlugin.kt$AndroidLibraryComposeConventionPlugin$ - NoConsecutiveBlankLines:MeshtasticFlavor.kt$ - NoUnusedImports:AndroidApplicationFlavorsConventionPlugin.kt$.AndroidApplicationFlavorsConventionPlugin.kt - NoUnusedImports:AndroidLibraryConventionPlugin.kt$.AndroidLibraryConventionPlugin.kt - SpacingAroundParens:MeshtasticFlavor.kt$MeshtasticFlavor.fdroid$) - TooGenericExceptionCaught:GitVersionValueSource.kt$GitVersionValueSource$e: Exception - TooGenericExceptionThrown:GitVersionValueSource.kt$GitVersionValueSource$throw RuntimeException("Failed to determine git commit count for versionCode. Ensure you have a full git history (not a shallow clone) and .git is present.\nOriginal error: ${e.message}", e) - UnusedImports:AndroidApplicationFlavorsConventionPlugin.kt$import com.geeksville.mesh.buildlogic.MeshtasticFlavor - UnusedImports:AndroidApplicationFlavorsConventionPlugin.kt$import com.geeksville.mesh.buildlogic.libs - UnusedImports:AndroidApplicationFlavorsConventionPlugin.kt$import org.gradle.kotlin.dsl.apply - UnusedImports:AndroidApplicationFlavorsConventionPlugin.kt$import org.gradle.kotlin.dsl.dependencies - UnusedImports:AndroidApplicationFlavorsConventionPlugin.kt$import org.gradle.kotlin.dsl.exclude - UnusedImports:AndroidLibraryConventionPlugin.kt$import com.geeksville.mesh.buildlogic.libs - UnusedImports:AndroidLibraryConventionPlugin.kt$import org.gradle.kotlin.dsl.dependencies - UnusedParameter:AndroidLintConventionPlugin.kt$project: Project - - diff --git a/core/datastore/detekt-baseline.xml b/core/datastore/detekt-baseline.xml index da5d9cabe6..5703cad343 100644 --- a/core/datastore/detekt-baseline.xml +++ b/core/datastore/detekt-baseline.xml @@ -2,6 +2,5 @@ - CyclomaticComplexMethod:ModuleConfigDataSource.kt:ModuleConfigDataSource$suspend fun setLocalModuleConfig diff --git a/core/takserver/detekt-baseline.xml b/core/takserver/detekt-baseline.xml index 7360396a7e..e0ff8ce2e0 100644 --- a/core/takserver/detekt-baseline.xml +++ b/core/takserver/detekt-baseline.xml @@ -3,13 +3,9 @@ AbstractClassCanBeInterface:TAKModels.kt:TAKConnectionEvent$TAKConnectionEvent - LongMethod:ZipArchiver.kt:ZipArchiver$actual fun createZip: ByteArray NoNameShadowing:TAKPacketV2Conversion.kt:TAKPacketV2Conversion$wb NoNameShadowing:TakV2Compressor.kt:TakV2Compressor$wb ReturnCount:TAKServerJvm.kt:TAKServerJvm$override suspend fun start: Result<Unit> - UnusedPrivateProperty:AtakFileWriter.kt:AtakFileWriter$private const val ZIP_MIME_TYPE = "application/zip" - UnusedPrivateProperty:AtakFileWriter.kt:AtakFileWriter$private val DOWNLOADS_RELATIVE_PATH = "${Environment.DIRECTORY_DOWNLOADS}/" - UnusedPrivateProperty:AtakFileWriter.kt:AtakFileWriter$private val UNSAFE_FILE_NAME_CHARS = Regex("[^a-zA-Z0-9._-]") UnusedPrivateProperty:TAKClientConnection.kt:TAKClientConnection$private val scope: CoroutineScope UseOrEmpty:CoTXml.kt:chat.senderCallsign?.xmlEscaped() ?: "" UseOrEmpty:CoTXmlParser.kt:CoTXmlParser$detail.remarks?.value ?: "" diff --git a/core/ui/detekt-baseline.xml b/core/ui/detekt-baseline.xml index a099f4eb79..8ce27952e1 100644 --- a/core/ui/detekt-baseline.xml +++ b/core/ui/detekt-baseline.xml @@ -33,9 +33,6 @@ MagicNumber:EditIPv4Preference.kt:16 MagicNumber:EditIPv4Preference.kt:24 MagicNumber:EditIPv4Preference.kt:8 - MagicNumber:EditListPreference.kt:12345 - MagicNumber:EditListPreference.kt:67890 - MagicNumber:LazyColumnDragAndDropDemo.kt:50 MatchingDeclarationName:LocalTracerouteMapOverlayInsetsProvider.kt:TracerouteMapOverlayInsets MissingNonRestartableComposable:AlertDialogs.kt:@Composable fun MeshtasticResourceDialog MissingNonRestartableComposable:AlertDialogs.kt:@Composable fun MeshtasticTextDialog diff --git a/desktopApp/detekt-baseline.xml b/desktopApp/detekt-baseline.xml index 1c30a4e1b2..eb207395c0 100644 --- a/desktopApp/detekt-baseline.xml +++ b/desktopApp/detekt-baseline.xml @@ -2,14 +2,8 @@ - ModifierMissing:DesktopMainScreen.kt:@Composable fun DesktopMainScreen UnnecessaryLaunchedEffect:DesktopTracerouteMap.kt:LaunchedEffect UnnecessaryLaunchedEffect:Main.kt:LaunchedEffect UnusedPrivateProperty:MacOSNotificationSender.kt:MacOSNotificationSender$unused: Unit = Unit - ViewModelForwarding:DesktopMainScreen.kt:MeshtasticAppShell( multiBackstack = multiBackstack, uiViewModel = uiViewModel, hostModifier = Modifier.padding(bottom = 24.dp), ) { MeshtasticNavigationSuite( multiBackstack = multiBackstack, uiViewModel = uiViewModel, modifier = Modifier.fillMaxSize(), ) { val provider = entryProvider<NavKey> { desktopNavGraph(backStack, uiViewModel, multiBackstack) } MeshtasticNavDisplay( multiBackstack = multiBackstack, entryProvider = provider, modifier = Modifier.fillMaxSize(), ) } } - ViewModelForwarding:DesktopMainScreen.kt:MeshtasticNavigationSuite( multiBackstack = multiBackstack, uiViewModel = uiViewModel, modifier = Modifier.fillMaxSize(), ) { val provider = entryProvider<NavKey> { desktopNavGraph(backStack, uiViewModel, multiBackstack) } MeshtasticNavDisplay( multiBackstack = multiBackstack, entryProvider = provider, modifier = Modifier.fillMaxSize(), ) } - ViewModelForwarding:Main.kt:DesktopMainScreen(uiViewModel, multiBackstack) - ViewModelForwarding:Main.kt:MeshtasticDesktopApp(uiViewModel, isDarkTheme, contrastLevel) - ViewModelForwarding:Main.kt:MeshtasticWindow(uiViewModel, isDarkTheme, contrastLevel, appIcon, windowState) { isAppVisible = false } diff --git a/feature/firmware/detekt-baseline.xml b/feature/firmware/detekt-baseline.xml index 75af066240..1418f62ef3 100644 --- a/feature/firmware/detekt-baseline.xml +++ b/feature/firmware/detekt-baseline.xml @@ -9,12 +9,6 @@ AbstractClassCanBeInterface:UnifiedOtaProtocol.kt:OtaCommand$OtaCommand AbstractClassCanBeInterface:UnifiedOtaProtocol.kt:OtaHandshakeStatus$OtaHandshakeStatus AbstractClassCanBeInterface:UnifiedOtaProtocol.kt:OtaResponse$OtaResponse - Kdoc:LegacyDfuTransport.kt:LegacyDfuTransport$/** * Stream [firmware] to the Packet characteristic, awaiting a [LegacyDfuResponse.PacketReceipt] every * [PRN_INTERVAL_PACKETS] packets and verifying the bytes-received count. * * Watches the connection state in parallel with the write loop; if the link drops mid-stream we cancel the write * coroutine and surface a [DfuException.ConnectionFailed] immediately rather than waiting indefinitely for a write * that will never complete. */ - ModifierMissing:FirmwareUpdateScreen.kt:@Composable internal fun CheckingState - ModifierMissing:FirmwareUpdateScreen.kt:@Composable internal fun DisclaimerDialog - ModifierMissing:FirmwareUpdateScreen.kt:@Composable internal fun ErrorState - ModifierMissing:FirmwareUpdateScreen.kt:@Composable internal fun SuccessState - ModifierMissing:FirmwareUpdateScreen.kt:@Composable internal fun VerifyingState MultipleEmitters:FirmwareUpdateScreen.kt:@Composable @Suppress("LongMethod") private fun ReadyState MultipleEmitters:FirmwareUpdateScreen.kt:@Composable internal fun CheckingState MultipleEmitters:FirmwareUpdateScreen.kt:@Composable internal fun ErrorState diff --git a/feature/intro/detekt-baseline.xml b/feature/intro/detekt-baseline.xml index 23792d7491..8b0920ebbd 100644 --- a/feature/intro/detekt-baseline.xml +++ b/feature/intro/detekt-baseline.xml @@ -2,8 +2,6 @@ - ComposableParamOrder:PermissionScreenLayout.kt:@Composable internal fun PermissionScreenLayout ParameterNaming:WelcomeScreen.kt:onGetStarted: () -> Unit - PreviewPublic:WelcomeScreen.kt:@Preview @Composable fun WelcomeScreenPreview diff --git a/feature/node/detekt-baseline.xml b/feature/node/detekt-baseline.xml index b637abf304..7db65a1758 100644 --- a/feature/node/detekt-baseline.xml +++ b/feature/node/detekt-baseline.xml @@ -28,7 +28,6 @@ LambdaParameterEventTrailing:TracerouteChart.kt:onPointSelected: (Double) -> Unit LongParameterList:CommonGetNodeDetailsUseCase.kt:CommonGetNodeDetailsUseCase MagicNumber:CompassViewModel.kt:CompassViewModel$180.0 - ModifierMissing:BaseMetricChart.kt:@Composable @Suppress("LongMethod") fun <T> BaseMetricScreen ModifierMissing:CommonCharts.kt:@Composable fun LegendIndicator ModifierMissing:DeviceMetrics.kt:@Suppress("LongMethod") @Composable fun DeviceMetricsScreen ModifierMissing:EnvironmentMetrics.kt:@Composable fun EnvironmentMetricsScreen @@ -40,7 +39,6 @@ ModifierMissing:PositionLogComponents.kt:@Composable @Suppress("LongMethod") fun PositionCard ModifierMissing:PositionLogScreens.kt:@Composable fun PositionLogScreen ModifierMissing:PowerMetrics.kt:@Suppress("LongMethod") @Composable fun PowerMetricsScreen - ModifierMissing:SignalMetrics.kt:@Suppress("LongMethod") @Composable fun SignalMetricsScreen ModifierNotUsedAtRoot:NeighborInfoLog.kt:modifier = modifier.fillMaxSize().padding(innerPadding) ModifierNotUsedAtRoot:TracerouteMapScreen.kt:modifier = modifier.fillMaxSize().padding(paddingValues) ModifierWithoutDefault:NodeDetailScreens.kt:modifier: Modifier @@ -81,13 +79,7 @@ PreviewPublic:NodeDetailPreviews.kt:@PreviewLightDark @Composable fun NodeDetailContentLoadingPreview PreviewPublic:NodeDetailPreviews.kt:@PreviewLightDark @Composable fun NodeDetailContentLocalPreview PreviewPublic:NodeDetailPreviews.kt:@PreviewLightDark @Composable fun NodeDetailContentRemotePreview - PreviewPublic:NodeListItemPreviews.kt:@PreviewLightDark @Composable fun NodeItemCompactActivePreview - PreviewPublic:NodeListItemPreviews.kt:@PreviewLightDark @Composable fun NodeItemCompactAllFieldsPreview - PreviewPublic:NodeListItemPreviews.kt:@PreviewLightDark @Composable fun NodeItemCompactMinimalPreview - PreviewPublic:NodeListItemPreviews.kt:@PreviewLightDark @Composable fun NodeItemCompleteActivePreview - PreviewPublic:NodeListItemPreviews.kt:@PreviewLightDark @Composable fun NodeItemCompletePreview TooGenericExceptionCaught:MetricsViewModel.kt:MetricsViewModel$e: Exception - TooGenericExceptionCaught:NodeManagementActions.kt:NodeManagementActions$ex: Exception UnnecessaryLaunchedEffect:CompassBottomSheet.kt:LaunchedEffect UnnecessaryLaunchedEffect:NodeDetailScreens.kt:LaunchedEffect UnnecessaryLaunchedEffect:NodeListScreen.kt:LaunchedEffect diff --git a/feature/settings/detekt-baseline.xml b/feature/settings/detekt-baseline.xml index 3042014edf..b4b30ff8ae 100644 --- a/feature/settings/detekt-baseline.xml +++ b/feature/settings/detekt-baseline.xml @@ -17,14 +17,12 @@ LongMethod:LoRaConfigItemList.kt:@Composable fun LoRaConfigScreen LongMethod:PowerConfigItemList.kt:@Composable fun PowerConfigScreen LongMethod:RadioConfigViewModel.kt:RadioConfigViewModel$private fun processPacketResponse - LongMethod:SecurityConfigScreen.android.kt:@Composable actual fun SecurityKeyBackupActions LongMethod:SerialConfigItemList.kt:@Composable fun SerialConfigScreen LongMethod:StoreForwardConfigItemList.kt:@Composable fun StoreForwardConfigScreen LongMethod:TelemetryConfigItemList.kt:@Composable fun TelemetryConfigScreen LongMethod:UserConfigItemList.kt:@Composable fun UserConfigScreen MagicNumber:Debug.kt:3 MagicNumber:DebugViewModel.kt:DebugViewModel$16 - MagicNumber:DebugViewModel.kt:DebugViewModel$8 MagicNumber:EditChannelDialog.kt:16 MagicNumber:EditChannelDialog.kt:32 MagicNumber:EditDeviceProfileDialog.kt:ProfileField.CHANNEL_URL$3 @@ -56,7 +54,6 @@ ModifierMissing:NeighborInfoConfigItemList.kt:@Composable fun NeighborInfoConfigScreen ModifierMissing:NetworkConfigItemList.kt:@Suppress("LongMethod", "CyclomaticComplexMethod") @Composable fun NetworkConfigScreen ModifierMissing:PacketResponseStateDialog.kt:@Composable fun <T> PacketResponseStateDialog - ModifierMissing:PaxcounterConfigItemList.kt:@Composable fun PaxcounterConfigScreen ModifierMissing:PositionConfigScreen.android.kt:@Composable actual fun DeviceLocationButton ModifierMissing:PositionConfigScreen.kt:@Composable @Suppress("LongMethod", "CyclomaticComplexMethod") fun PositionConfigScreenCommon ModifierMissing:PowerConfigItemList.kt:@Composable fun PowerConfigScreen @@ -75,7 +72,6 @@ MultipleEmitters:PacketResponseStateDialog.kt:@Composable private fun ErrorContent MultipleEmitters:PacketResponseStateDialog.kt:@Composable private fun SuccessContent MultipleEmitters:SecurityConfigScreen.android.kt:@Composable actual fun SecurityKeyBackupActions - MutableStateAutoboxing:DesktopSettingsScreen.kt:mutableStateOf(0) NoNameShadowing:Debug.kt:{ filterMode = it } NoNameShadowing:DebugViewModel.kt:LogSearchManager${ SearchMatch(logIndex, it.range.first, it.range.last, "decodedPayload") } NoNameShadowing:MeshBeaconConfigPolicy.kt:wb