diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index ba622c96..46452f8b 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -70,6 +70,45 @@ jobs: path: app/build/reports retention-days: 30 + detekt: + runs-on: ubuntu-latest + timeout-minutes: 30 + + steps: + + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - name: Validate Gradle wrapper + uses: gradle/actions/wrapper-validation@v3 + + - name: Mock files for CI + run: | + rm ./app/google-services.json + cp ./app/google-services-example.json ./app/google-services.json + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'zulu' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + + - name: Check detekt + run: ./gradlew detekt + + - name: Upload build reports + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: detekt-reports + path: app/build/reports + retention-days: 30 + androidTest: runs-on: ubuntu-latest timeout-minutes: 30 diff --git a/app/build.gradle b/app/build.gradle index 372f006f..f0d829c7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,7 @@ plugins { id 'de.mobilej.unmock' id 'com.google.protobuf' id "com.google.devtools.ksp" - id "io.gitlab.arturbosch.detekt" version "1.23.3" - id "org.jlleitschuh.gradle.ktlint" + id "io.gitlab.arturbosch.detekt" version "1.23.6" } unMock { @@ -265,6 +264,10 @@ dependencies { // MQTT implementation "org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5" + + //detekt ktlint formatting + detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.23.6") + } ksp { @@ -275,3 +278,8 @@ ksp { repositories { maven { url "https://jitpack.io" } } + +detekt { + config.setFrom("../config/detekt/detekt.yml") + baseline = file("../config/detekt/detekt-baseline.xml") +} \ No newline at end of file diff --git a/app/config/ktlint/baseline.xml b/app/config/ktlint/baseline.xml deleted file mode 100644 index e6b3904d..00000000 --- a/app/config/ktlint/baseline.xml +++ /dev/null @@ -1,4853 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build.gradle b/build.gradle index 49b6f88c..f84f9e57 100644 --- a/build.gradle +++ b/build.gradle @@ -40,7 +40,6 @@ plugins { id "org.jetbrains.kotlin.jvm" version "$kotlin_version" apply false id "com.google.devtools.ksp" version "2.0.0-1.0.22" apply false id "org.jetbrains.kotlin.plugin.compose" version "$kotlin_version" apply false - id "org.jlleitschuh.gradle.ktlint" version "12.1.1" } allprojects { diff --git a/app/detekt-baseline.xml b/config/detekt/detekt-baseline.xml similarity index 64% rename from app/detekt-baseline.xml rename to config/detekt/detekt-baseline.xml index 97b67078..56c7ccae 100644 --- a/app/detekt-baseline.xml +++ b/config/detekt/detekt-baseline.xml @@ -18,7 +18,7 @@ CyclomaticComplexMethod:RadioConfigViewModel.kt$RadioConfigViewModel$private fun processPacketResponse(packet: MeshProtos.MeshPacket) CyclomaticComplexMethod:SettingsFragment.kt$SettingsFragment$private fun initCommonUI() CyclomaticComplexMethod:UIState.kt$UIViewModel$fun saveMessagesCSV(uri: Uri) - DestructuringDeclarationWithTooManyEntries:NodeInfo.kt$val (chip, dist, name, pos, alt, sats, batt, heard, sig, env) = createRefs() + DestructuringDeclarationWithTooManyEntries:NodeInfo.kt$val (chip, dist, name, hw, pos, alt, sats, batt, heard, sig, env) = createRefs() EmptyCatchBlock:MeshLog.kt$MeshLog${ } EmptyClassBlock:DebugLogFile.kt$BinaryLogFile${ } EmptyDefaultConstructor:SqlTileWriterExt.kt$SqlTileWriterExt$() @@ -30,141 +30,8 @@ ExceptionRaisedInUnexpectedLocation:DistanceExtensions.kt$fun Float.toString( system: ConfigProtos.Config.DisplayConfig.DisplayUnits ): String ForbiddenComment:MapFragment.kt$// TODO: Accept filename input param from user ForbiddenComment:SafeBluetooth.kt$SafeBluetooth$// TODO: display some kind of UI about restarting BLE - FunctionNaming:AmbientLightingConfigItemList.kt$@Composable fun AmbientLightingConfigItemList( ambientLightingConfig: ModuleConfigProtos.ModuleConfig.AmbientLightingConfig, enabled: Boolean, onSaveClicked: (ModuleConfigProtos.ModuleConfig.AmbientLightingConfig) -> Unit, ) - FunctionNaming:AmbientLightingConfigItemList.kt$@Preview(showBackground = true) @Composable private fun AmbientLightingConfigPreview() - FunctionNaming:AudioConfigItemList.kt$@Composable fun AudioConfigItemList( audioConfig: AudioConfig, enabled: Boolean, onSaveClicked: (AudioConfig) -> Unit, ) - FunctionNaming:AudioConfigItemList.kt$@Preview(showBackground = true) @Composable private fun AudioConfigPreview() - FunctionNaming:BatteryInfo.kt$@Composable @Preview fun BatteryInfoPreviewSimple() - FunctionNaming:BatteryInfo.kt$@Composable @Preview(showBackground = true) @Preview(showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_YES) fun BatteryInfoPreview( @PreviewParameter(BatteryInfoPreviewParameterProvider::class) batteryInfo: Pair<Int?, Float?> ) - FunctionNaming:BatteryInfo.kt$@Composable fun BatteryInfo( modifier: Modifier = Modifier, batteryLevel: Int?, voltage: Float? ) - FunctionNaming:BitwisePreference.kt$@Composable fun BitwisePreference( title: String, value: Int, enabled: Boolean, items: List<Pair<Int, String>>, onItemSelected: (Int) -> Unit, modifier: Modifier = Modifier, ) - FunctionNaming:BitwisePreference.kt$@Preview(showBackground = true) @Composable private fun BitwisePreferencePreview() - FunctionNaming:BluetoothConfigItemList.kt$@Composable fun BluetoothConfigItemList( bluetoothConfig: BluetoothConfig, enabled: Boolean, onSaveClicked: (BluetoothConfig) -> Unit, ) - FunctionNaming:BluetoothConfigItemList.kt$@Preview(showBackground = true) @Composable private fun BluetoothConfigPreview() - FunctionNaming:CacheLayout.kt$@Composable internal fun CacheLayout( cacheEstimate: String, onExecuteJob: () -> Unit, onCancelDownload: () -> Unit, modifier: Modifier = Modifier, ) - FunctionNaming:CacheLayout.kt$@Preview(showBackground = true) @Composable private fun CacheLayoutPreview() - FunctionNaming:CannedMessageConfigItemList.kt$@Composable fun CannedMessageConfigItemList( messages: String, cannedMessageConfig: CannedMessageConfig, enabled: Boolean, onSaveClicked: (messages: String, config: CannedMessageConfig) -> Unit, ) - FunctionNaming:CannedMessageConfigItemList.kt$@Preview(showBackground = true) @Composable private fun CannedMessageConfigPreview() - FunctionNaming:ChannelFragment.kt$@Composable fun ChannelScreen( viewModel: UIViewModel = viewModel(), showSnackbar: (String) -> Unit = {}, ) - FunctionNaming:ChannelFragment.kt$@Preview(showBackground = true) @Composable private fun ChannelScreenPreview() - FunctionNaming:ChannelSettingsItemList.kt$@Composable fun ChannelSettingsItemList( settingsList: List<ChannelSettings>, modemPresetName: String = "Default", maxChannels: Int = 8, enabled: Boolean, onNegativeClicked: () -> Unit = { }, onPositiveClicked: (List<ChannelSettings>) -> Unit, ) - FunctionNaming:ChannelSettingsItemList.kt$@OptIn(ExperimentalMaterialApi::class) @Composable fun ChannelCard( index: Int, title: String, enabled: Boolean, onEditClick: () -> Unit, onDeleteClick: () -> Unit, elevation: Dp = 4.dp, ) - FunctionNaming:ChannelSettingsItemList.kt$@Preview(showBackground = true) @Composable private fun ChannelSettingsPreview() - FunctionNaming:ClickableTextField.kt$@Composable fun ClickableTextField( @StringRes label: Int, enabled: Boolean, trailingIcon: ImageVector, value: String, onClick: () -> Unit, modifier: Modifier = Modifier, isError: Boolean = false, ) - FunctionNaming:ContactItem.kt$@OptIn(ExperimentalMaterialApi::class) @Composable fun ContactItem( contact: Contact, modifier: Modifier = Modifier, ) - FunctionNaming:ContactItem.kt$@Preview(showBackground = true) @Preview(showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_YES) @Composable private fun ContactItemPreview() - FunctionNaming:ContactsFragment.kt$@OptIn(ExperimentalFoundationApi::class) @Composable fun ContactsScreen( model: ContactsViewModel = hiltViewModel(), onClick: (Contact) -> Unit, onLongClick: (Contact) -> Unit, ) - FunctionNaming:DetectionSensorConfigItemList.kt$@Composable fun DetectionSensorConfigItemList( detectionSensorConfig: ModuleConfigProtos.ModuleConfig.DetectionSensorConfig, enabled: Boolean, onSaveClicked: (ModuleConfigProtos.ModuleConfig.DetectionSensorConfig) -> Unit, ) - FunctionNaming:DetectionSensorConfigItemList.kt$@Preview(showBackground = true) @Composable private fun DetectionSensorConfigPreview() - FunctionNaming:DeviceConfigItemList.kt$@Composable fun DeviceConfigItemList( deviceConfig: DeviceConfig, enabled: Boolean, onSaveClicked: (DeviceConfig) -> Unit, ) - FunctionNaming:DeviceConfigItemList.kt$@Preview(showBackground = true) @Composable private fun DeviceConfigPreview() - FunctionNaming:DeviceSettingsFragment.kt$@Composable fun RadioConfigNavHost( node: NodeInfo?, viewModel: RadioConfigViewModel = hiltViewModel(), navController: NavHostController = rememberNavController(), modifier: Modifier, ) - FunctionNaming:DeviceSettingsFragment.kt$@Composable private fun MeshAppBar( currentScreen: String, canNavigateBack: Boolean, navigateUp: () -> Unit, modifier: Modifier = Modifier, ) - FunctionNaming:DeviceSettingsFragment.kt$@Composable private fun NavButton(@StringRes title: Int, enabled: Boolean, onClick: () -> Unit) - FunctionNaming:DeviceSettingsFragment.kt$@Composable private fun NavCard( title: String, enabled: Boolean, onClick: () -> Unit ) - FunctionNaming:DeviceSettingsFragment.kt$@Composable private fun RadioSettingsScreen( enabled: Boolean = true, isLocal: Boolean = true, onRouteClick: (Any) -> Unit = {}, ) - FunctionNaming:DeviceSettingsFragment.kt$@Preview(showBackground = true) @Composable private fun RadioSettingsScreenPreview() - FunctionNaming:DisplayConfigItemList.kt$@Composable fun DisplayConfigItemList( displayConfig: DisplayConfig, enabled: Boolean, onSaveClicked: (DisplayConfig) -> Unit, ) - FunctionNaming:DisplayConfigItemList.kt$@Preview(showBackground = true) @Composable private fun DisplayConfigPreview() - FunctionNaming:DownloadButton.kt$@Composable internal fun DownloadButton( enabled: Boolean, onClick: () -> Unit, ) - FunctionNaming:DropDownPreference.kt$@Composable fun <T> DropDownPreference( title: String, enabled: Boolean, items: List<Pair<T, String>>, selectedItem: T, onItemSelected: (T) -> Unit, modifier: Modifier = Modifier, ) - FunctionNaming:DropDownPreference.kt$@Preview(showBackground = true) @Composable private fun DropDownPreferencePreview() - FunctionNaming:EditChannelDialog.kt$@Composable fun EditChannelDialog( channelSettings: ChannelProtos.ChannelSettings, onAddClick: (ChannelProtos.ChannelSettings) -> Unit, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, modemPresetName: String = "Default", ) - FunctionNaming:EditChannelDialog.kt$@Preview(showBackground = true) @Composable private fun EditChannelDialogPreview() - FunctionNaming:EditDeviceProfileDialog.kt$@Composable fun EditDeviceProfileDialog( title: String, deviceProfile: ClientOnlyProtos.DeviceProfile, onAddClick: (ClientOnlyProtos.DeviceProfile) -> Unit, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, ) - FunctionNaming:EditDeviceProfileDialog.kt$@Preview(showBackground = true) @Composable private fun EditDeviceProfileDialogPreview() - FunctionNaming:EditIPv4Preference.kt$@Composable fun EditIPv4Preference( title: String, value: Int, enabled: Boolean, keyboardActions: KeyboardActions, onValueChanged: (Int) -> Unit, modifier: Modifier = Modifier, ) - FunctionNaming:EditIPv4Preference.kt$@Preview(showBackground = true) @Composable private fun EditIPv4PreferencePreview() - FunctionNaming:EditListPreference.kt$@Composable inline fun <reified T> EditListPreference( title: String, list: List<T>, maxCount: Int, enabled: Boolean, keyboardActions: KeyboardActions, crossinline onValuesChanged: (List<T>) -> Unit, modifier: Modifier = Modifier, ) - FunctionNaming:EditListPreference.kt$@Preview(showBackground = true) @Composable private fun EditListPreferencePreview() - FunctionNaming:EditPasswordPreference.kt$@Composable fun EditPasswordPreference( title: String, value: String, maxSize: Int, enabled: Boolean, keyboardActions: KeyboardActions, onValueChanged: (String) -> Unit, modifier: Modifier = Modifier, ) - FunctionNaming:EditPasswordPreference.kt$@Preview(showBackground = true) @Composable private fun EditPasswordPreferencePreview() - FunctionNaming:EditTextPreference.kt$@Composable fun EditTextPreference( title: String, value: Double, enabled: Boolean, keyboardActions: KeyboardActions, onValueChanged: (Double) -> Unit, modifier: Modifier = Modifier, ) - FunctionNaming:EditTextPreference.kt$@Composable fun EditTextPreference( title: String, value: Float, enabled: Boolean, keyboardActions: KeyboardActions, onValueChanged: (Float) -> Unit, modifier: Modifier = Modifier, onFocusChanged: (FocusState) -> Unit = {}, ) - FunctionNaming:EditTextPreference.kt$@Composable fun EditTextPreference( title: String, value: Int, enabled: Boolean, keyboardActions: KeyboardActions, onValueChanged: (Int) -> Unit, modifier: Modifier = Modifier, onFocusChanged: (FocusState) -> Unit = {}, trailingIcon: (@Composable () -> Unit)? = null, ) - FunctionNaming:EditTextPreference.kt$@Composable fun EditTextPreference( title: String, value: String, enabled: Boolean, isError: Boolean, keyboardOptions: KeyboardOptions, keyboardActions: KeyboardActions, onValueChanged: (String) -> Unit, modifier: Modifier = Modifier, maxSize: Int = 0, // max_size - 1 (in bytes) onFocusChanged: (FocusState) -> Unit = {}, trailingIcon: (@Composable () -> Unit)? = null, visualTransformation: VisualTransformation = VisualTransformation.None, ) - FunctionNaming:EditTextPreference.kt$@Preview(showBackground = true) @Composable private fun EditTextPreferencePreview() - FunctionNaming:EditWaypointDialog.kt$@Composable internal fun EditWaypointDialog( waypoint: Waypoint, onSendClicked: (Waypoint) -> Unit, onDeleteClicked: (Waypoint) -> Unit, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, ) - FunctionNaming:EditWaypointDialog.kt$@Preview(showBackground = true) @Composable private fun EditWaypointFormPreview() - FunctionNaming:ElevationInfo.kt$@Composable @Preview fun ElevationInfoPreview() - FunctionNaming:ElevationInfo.kt$@Composable fun ElevationInfo( modifier: Modifier = Modifier, altitude: Float, system: DisplayUnits, suffix: String ) - FunctionNaming:ExternalNotificationConfigItemList.kt$@Composable fun ExternalNotificationConfigItemList( ringtone: String, extNotificationConfig: ExternalNotificationConfig, enabled: Boolean, onSaveClicked: (ringtone: String, config: ExternalNotificationConfig) -> Unit, ) - FunctionNaming:ExternalNotificationConfigItemList.kt$@Preview(showBackground = true) @Composable private fun ExternalNotificationConfigPreview() - FunctionNaming:IconButton.kt$@Composable fun IconButton( onClick: () -> Unit, @DrawableRes drawableRes: Int, @StringRes contentDescription: Int, modifier: Modifier = Modifier, enabled: Boolean = true, ) - FunctionNaming:IconButton.kt$@Composable fun IconButton( onClick: () -> Unit, @DrawableRes drawableRes: Int, contentDescription: String?, modifier: Modifier = Modifier, enabled: Boolean = true, ) - FunctionNaming:IconButton.kt$@Preview(showBackground = true) @Composable private fun IconButtonsPreview() - FunctionNaming:LastHeardInfo.kt$@Composable @Preview(showBackground = true) @Preview(showBackground = true, uiMode = android.content.res.Configuration.UI_MODE_NIGHT_YES) fun LastHeardInfoPreview() - FunctionNaming:LastHeardInfo.kt$@Composable fun LastHeardInfo( modifier: Modifier = Modifier, lastHeard: Int ) - FunctionNaming:LazyColumnDragAndDropDemo.kt$@OptIn(ExperimentalFoundationApi::class) @Composable fun LazyItemScope.DraggableItem( dragDropState: DragDropState, key: Int, modifier: Modifier = Modifier, content: @Composable ColumnScope.(isDragging: Boolean) -> Unit ) - FunctionNaming:LazyColumnDragAndDropDemo.kt$@Preview @Composable fun LazyColumnDragAndDropDemo() - FunctionNaming:LinkedCoordinates.kt$@Composable @Preview fun LinkedCoordinatesSimplePreview() - FunctionNaming:LinkedCoordinates.kt$@Composable @Preview(showBackground = true) @Preview(showBackground = true, uiMode = android.content.res.Configuration.UI_MODE_NIGHT_YES) fun LinkedCoordinatesPreview( @PreviewParameter(GPSFormatPreviewParameterProvider::class) format: Int ) - FunctionNaming:LinkedCoordinates.kt$@Composable fun LinkedCoordinates( modifier : Modifier = Modifier, position: Position?, format: Int, nodeName: String? ) - FunctionNaming:LoRaConfigItemList.kt$@Composable fun LoRaConfigItemList( loraConfig: LoRaConfig, primarySettings: ChannelSettings, enabled: Boolean, onSaveClicked: (LoRaConfig) -> Unit, ) - FunctionNaming:LoRaConfigItemList.kt$@Preview(showBackground = true) @Composable private fun LoRaConfigPreview() - FunctionNaming:LocationUtils.kt$GPSFormat$fun DEC(p: Position): String - FunctionNaming:LocationUtils.kt$GPSFormat$fun DMS(p: Position): String - FunctionNaming:LocationUtils.kt$GPSFormat$fun MGRS(p: Position): String - FunctionNaming:LocationUtils.kt$GPSFormat$fun UTM(p: Position): String - FunctionNaming:LocationUtils.kt$fun DMSToDegrees( degrees: Double, minutes: Double, seconds: Double, isPostive: Boolean ): Double - FunctionNaming:LocationUtils.kt$fun DMSToDegrees( degrees: Int, minutes: Int, seconds: Float, isPostive: Boolean ): Double - FunctionNaming:MQTTConfigItemList.kt$@Composable fun MQTTConfigItemList( mqttConfig: MQTTConfig, enabled: Boolean, onSaveClicked: (MQTTConfig) -> Unit, ) - FunctionNaming:MQTTConfigItemList.kt$@Preview(showBackground = true) @Composable private fun MQTTConfigPreview() - FunctionNaming:MapFragment.kt$@Composable fun MapView( model: UIViewModel = viewModel(), ) - FunctionNaming:MapFragment.kt$@Composable private fun MapView.UpdateMarkers( nodeMarkers: List<MarkerWithLabel>, waypointMarkers: List<MarkerWithLabel>, ) - FunctionNaming:NeighborInfoConfigItemList.kt$@Composable fun NeighborInfoConfigItemList( neighborInfoConfig: ModuleConfigProtos.ModuleConfig.NeighborInfoConfig, enabled: Boolean, onSaveClicked: (ModuleConfigProtos.ModuleConfig.NeighborInfoConfig) -> Unit, ) - FunctionNaming:NeighborInfoConfigItemList.kt$@Preview(showBackground = true) @Composable private fun NeighborInfoConfigPreview() - FunctionNaming:NetworkConfigItemList.kt$@Composable fun NetworkConfigItemList( networkConfig: NetworkConfig, enabled: Boolean, onSaveClicked: (NetworkConfig) -> Unit, ) - FunctionNaming:NetworkConfigItemList.kt$@Preview(showBackground = true) @Composable private fun NetworkConfigPreview() - FunctionNaming:NodeFilterTextField.kt$@Composable @Preview(uiMode = android.content.res.Configuration.UI_MODE_NIGHT_YES) @Preview(uiMode = android.content.res.Configuration.UI_MODE_NIGHT_NO) fun NodeFilterTextFieldPreview() - FunctionNaming:NodeFilterTextField.kt$@Composable fun NodeFilterTextField( filterText : String, onTextChanged : (String) -> Unit, modifier: Modifier = Modifier, ) - FunctionNaming:NodeInfo.kt$@Composable @Preview( showBackground = true, uiMode = android.content.res.Configuration.UI_MODE_NIGHT_YES, ) fun NodeInfoPreview( @PreviewParameter(NodeInfoPreviewParameterProvider::class) thatNodeInfo: NodeInfo ) - FunctionNaming:NodeInfo.kt$@Composable @Preview(showBackground = false) fun NodeInfoSimplePreview() - FunctionNaming:NodeInfo.kt$@OptIn(ExperimentalMaterialApi::class) @Composable fun NodeInfo( thisNodeInfo: NodeInfo?, thatNodeInfo: NodeInfo, gpsFormat: Int, distanceUnits: Int, tempInFahrenheit: Boolean, isIgnored: Boolean = false, onClicked: () -> Unit = {}, blinking: Boolean = false, ) - FunctionNaming:NodeSortButton.kt$@Composable internal fun NodeSortButton( currentSortOption: NodeSortOption, onSortSelected: (NodeSortOption) -> Unit, includeUnknown: Boolean, onToggleIncludeUnknown: () -> Unit, modifier: Modifier = Modifier, ) FunctionNaming:PacketDao.kt$PacketDao$@Query("DELETE FROM packet WHERE uuid=:uuid") fun _delete(uuid: Long) - FunctionNaming:PacketResponseStateDialog.kt$@Composable fun <T> PacketResponseStateDialog( state: ResponseState<T>, onDismiss: () -> Unit = {}, onComplete: () -> Unit = {}, ) - FunctionNaming:PacketResponseStateDialog.kt$@Preview(showBackground = true) @Composable private fun PacketResponseStateDialogPreview() - FunctionNaming:PaxcounterConfigItemList.kt$@Composable fun PaxcounterConfigItemList( paxcounterConfig: ModuleConfigProtos.ModuleConfig.PaxcounterConfig, enabled: Boolean, onSaveClicked: (ModuleConfigProtos.ModuleConfig.PaxcounterConfig) -> Unit, ) - FunctionNaming:PaxcounterConfigItemList.kt$@Preview(showBackground = true) @Composable private fun PaxcounterConfigPreview() - FunctionNaming:PositionConfigItemList.kt$@Composable fun PositionConfigItemList( isLocal: Boolean = false, location: Position?, positionConfig: PositionConfig, enabled: Boolean, onSaveClicked: (position: Position?, config: PositionConfig) -> Unit, ) - FunctionNaming:PositionConfigItemList.kt$@Preview(showBackground = true) @Composable private fun PositionConfigPreview() - FunctionNaming:PositionPrecisionPreference.kt$@Composable fun PositionPrecisionPreference( title: String, value: Int, enabled: Boolean, onValueChanged: (Int) -> Unit, modifier: Modifier = Modifier, ) - FunctionNaming:PowerConfigItemList.kt$@Composable fun PowerConfigItemList( powerConfig: PowerConfig, enabled: Boolean, onSaveClicked: (PowerConfig) -> Unit, ) - FunctionNaming:PowerConfigItemList.kt$@Preview(showBackground = true) @Composable private fun PowerConfigPreview() - FunctionNaming:PreferenceCategory.kt$@Composable fun PreferenceCategory( text: String, modifier: Modifier = Modifier ) - FunctionNaming:PreferenceCategory.kt$@Preview(showBackground = true) @Composable private fun PreferenceCategoryPreview() - FunctionNaming:PreferenceFooter.kt$@Composable fun PreferenceFooter( enabled: Boolean, @StringRes negativeText: Int, onNegativeClicked: () -> Unit, @StringRes positiveText: Int, onPositiveClicked: () -> Unit, modifier: Modifier = Modifier, ) - FunctionNaming:PreferenceFooter.kt$@Composable fun PreferenceFooter( enabled: Boolean, onCancelClicked: () -> Unit, onSaveClicked: () -> Unit, modifier: Modifier = Modifier, ) - FunctionNaming:PreferenceFooter.kt$@Preview(showBackground = true) @Composable private fun PreferenceFooterPreview() FunctionNaming:QuickChatActionDao.kt$QuickChatActionDao$@Query("Delete from quick_chat where uuid=:uuid") fun _delete(uuid: Long) - FunctionNaming:RangeTestConfigItemList.kt$@Composable fun RangeTestConfigItemList( rangeTestConfig: RangeTestConfig, enabled: Boolean, onSaveClicked: (RangeTestConfig) -> Unit, ) - FunctionNaming:RangeTestConfigItemList.kt$@Preview(showBackground = true) @Composable private fun RangeTestConfig() - FunctionNaming:RegularPreference.kt$@Composable fun RegularPreference( title: String, subtitle: AnnotatedString, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, trailingIcon: ImageVector? = null, ) - FunctionNaming:RegularPreference.kt$@Composable fun RegularPreference( title: String, subtitle: String, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, trailingIcon: ImageVector? = null, ) - FunctionNaming:RegularPreference.kt$@Preview(showBackground = true) @Composable private fun RegularPreferencePreview() - FunctionNaming:RemoteHardwareConfigItemList.kt$@Composable fun RemoteHardwareConfigItemList( remoteHardwareConfig: RemoteHardwareConfig, enabled: Boolean, onSaveClicked: (RemoteHardwareConfig) -> Unit, ) - FunctionNaming:RemoteHardwareConfigItemList.kt$@Preview(showBackground = true) @Composable private fun RemoteHardwareConfigPreview() - FunctionNaming:SatelliteCountInfo.kt$@Composable @Preview( showBackground = true, uiMode = android.content.res.Configuration.UI_MODE_NIGHT_YES ) @Preview( showBackground = true, ) fun SatelliteCountInfoPreview() - FunctionNaming:SatelliteCountInfo.kt$@Composable fun SatelliteCountInfo( modifier: Modifier = Modifier, satCount: Int, ) - FunctionNaming:SerialConfigItemList.kt$@Composable fun SerialConfigItemList( serialConfig: SerialConfig, enabled: Boolean, onSaveClicked: (SerialConfig) -> Unit, ) - FunctionNaming:SerialConfigItemList.kt$@Preview(showBackground = true) @Composable private fun SerialConfigPreview() - FunctionNaming:SignalInfo.kt$@Composable @Preview(showBackground = true) @Preview(showBackground = true, uiMode = android.content.res.Configuration.UI_MODE_NIGHT_YES) fun SignalInfoPreview( @PreviewParameter(NodeInfoPreviewParameterProvider::class) nodeInfo: NodeInfo ) - FunctionNaming:SignalInfo.kt$@Composable @Preview(showBackground = true) @Preview(showBackground = true, uiMode = android.content.res.Configuration.UI_MODE_NIGHT_YES) fun SignalInfoSelfPreview( @PreviewParameter(NodeInfoPreviewParameterProvider::class) nodeInfo: NodeInfo ) - FunctionNaming:SignalInfo.kt$@Composable @Preview(showBackground = true) fun SignalInfoSimplePreview() - FunctionNaming:StoreForwardConfigItemList.kt$@Composable fun StoreForwardConfigItemList( storeForwardConfig: StoreForwardConfig, enabled: Boolean, onSaveClicked: (StoreForwardConfig) -> Unit, ) - FunctionNaming:StoreForwardConfigItemList.kt$@Preview(showBackground = true) @Composable private fun StoreForwardConfigPreview() - FunctionNaming:SwitchPreference.kt$@Composable fun SwitchPreference( title: String, checked: Boolean, enabled: Boolean, onCheckedChange: (Boolean) -> Unit, modifier: Modifier = Modifier, ) - FunctionNaming:SwitchPreference.kt$@Preview(showBackground = true) @Composable private fun SwitchPreferencePreview() - FunctionNaming:TelemetryConfigItemList.kt$@Composable fun TelemetryConfigItemList( telemetryConfig: TelemetryConfig, enabled: Boolean, onSaveClicked: (TelemetryConfig) -> Unit, ) - FunctionNaming:TelemetryConfigItemList.kt$@Preview(showBackground = true) @Composable private fun TelemetryConfigPreview() - FunctionNaming:TextDividerPreference.kt$@Composable fun TextDividerPreference( title: AnnotatedString, modifier: Modifier = Modifier, enabled: Boolean = true, trailingIcon: ImageVector? = null, ) - FunctionNaming:TextDividerPreference.kt$@Composable fun TextDividerPreference( title: String, modifier: Modifier = Modifier, enabled: Boolean = true, trailingIcon: ImageVector? = null, ) - FunctionNaming:TextDividerPreference.kt$@Preview(showBackground = true) @Composable private fun TextDividerPreferencePreview() - FunctionNaming:Theme.kt$@Composable fun AppTheme( darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit ) - FunctionNaming:UserConfigItemList.kt$@Composable fun UserConfigItemList( userConfig: MeshProtos.User, enabled: Boolean, onSaveClicked: (MeshProtos.User) -> Unit, ) - FunctionNaming:UserConfigItemList.kt$@Preview(showBackground = true) @Composable private fun UserConfigPreview() - FunctionNaming:UsersFragment.kt$@OptIn(ExperimentalFoundationApi::class) @Composable fun NodesScreen( model: UIViewModel = hiltViewModel(), onClick: (NodeInfo) -> Unit, ) FunctionParameterNaming:LocationUtils.kt$_degIn: Double FunctionParameterNaming:LocationUtils.kt$lat_a: Double FunctionParameterNaming:LocationUtils.kt$lat_b: Double @@ -218,27 +85,9 @@ LongMethod:UIState.kt$UIViewModel$fun saveMessagesCSV(uri: Uri) LongMethod:UserConfigItemList.kt$@Composable fun UserConfigItemList( userConfig: MeshProtos.User, enabled: Boolean, onSaveClicked: (MeshProtos.User) -> Unit, ) LongParameterList:BTScanModel.kt$BTScanModel$( private val application: Application, private val serviceRepository: ServiceRepository, private val bluetoothRepository: BluetoothRepository, private val usbRepository: UsbRepository, private val usbManagerLazy: dagger.Lazy<UsbManager>, private val networkRepository: NetworkRepository, private val radioInterfaceService: RadioInterfaceService, ) - LongParameterList:BitwisePreference.kt$( title: String, value: Int, enabled: Boolean, items: List<Pair<Int, String>>, onItemSelected: (Int) -> Unit, modifier: Modifier = Modifier, ) - LongParameterList:ChannelSettingsItemList.kt$( index: Int, title: String, enabled: Boolean, onEditClick: () -> Unit, onDeleteClick: () -> Unit, elevation: Dp = 4.dp, ) - LongParameterList:ChannelSettingsItemList.kt$( settingsList: List<ChannelSettings>, modemPresetName: String = "Default", maxChannels: Int = 8, enabled: Boolean, onNegativeClicked: () -> Unit = { }, onPositiveClicked: (List<ChannelSettings>) -> Unit, ) - LongParameterList:ClickableTextField.kt$( @StringRes label: Int, enabled: Boolean, trailingIcon: ImageVector, value: String, onClick: () -> Unit, modifier: Modifier = Modifier, isError: Boolean = false, ) - LongParameterList:DropDownPreference.kt$( title: String, enabled: Boolean, items: List<Pair<T, String>>, selectedItem: T, onItemSelected: (T) -> Unit, modifier: Modifier = Modifier, ) - LongParameterList:EditIPv4Preference.kt$( title: String, value: Int, enabled: Boolean, keyboardActions: KeyboardActions, onValueChanged: (Int) -> Unit, modifier: Modifier = Modifier, ) - LongParameterList:EditListPreference.kt$( title: String, list: List<T>, maxCount: Int, enabled: Boolean, keyboardActions: KeyboardActions, crossinline onValuesChanged: (List<T>) -> Unit, modifier: Modifier = Modifier, ) - LongParameterList:EditPasswordPreference.kt$( title: String, value: String, maxSize: Int, enabled: Boolean, keyboardActions: KeyboardActions, onValueChanged: (String) -> Unit, modifier: Modifier = Modifier, ) - LongParameterList:EditTextPreference.kt$( title: String, value: Double, enabled: Boolean, keyboardActions: KeyboardActions, onValueChanged: (Double) -> Unit, modifier: Modifier = Modifier, ) - LongParameterList:EditTextPreference.kt$( title: String, value: Float, enabled: Boolean, keyboardActions: KeyboardActions, onValueChanged: (Float) -> Unit, modifier: Modifier = Modifier, onFocusChanged: (FocusState) -> Unit = {}, ) - LongParameterList:EditTextPreference.kt$( title: String, value: Int, enabled: Boolean, keyboardActions: KeyboardActions, onValueChanged: (Int) -> Unit, modifier: Modifier = Modifier, onFocusChanged: (FocusState) -> Unit = {}, trailingIcon: (@Composable () -> Unit)? = null, ) - LongParameterList:EditTextPreference.kt$( title: String, value: String, enabled: Boolean, isError: Boolean, keyboardOptions: KeyboardOptions, keyboardActions: KeyboardActions, onValueChanged: (String) -> Unit, modifier: Modifier = Modifier, maxSize: Int = 0, // max_size - 1 (in bytes) onFocusChanged: (FocusState) -> Unit = {}, trailingIcon: (@Composable () -> Unit)? = null, visualTransformation: VisualTransformation = VisualTransformation.None, ) - LongParameterList:MeshService.kt$MeshService$( wantAck: Boolean = false, id: Int = generatePacketId(), // always assign a packet ID if we didn't already have one hopLimit: Int = localConfig.lora.hopLimit, channel: Int = 0, priority: MeshPacket.Priority = MeshPacket.Priority.UNSET, initFn: MeshProtos.Data.Builder.() -> Unit ) LongParameterList:NOAAWmsTileSource.kt$NOAAWmsTileSource$( aName: String, aBaseUrl: Array<String>, layername: String, version: String, time: String?, srs: String, style: String?, format: String, ) - LongParameterList:NodeInfo.kt$( thisNodeInfo: NodeInfo?, thatNodeInfo: NodeInfo, gpsFormat: Int, distanceUnits: Int, tempInFahrenheit: Boolean, isIgnored: Boolean = false, onClicked: () -> Unit = {}, blinking: Boolean = false, ) - LongParameterList:NodeMenu.kt$( node: NodeInfo, ignoreIncomingList: List<Int>, isOurNode: Boolean = false, showAdmin: Boolean = false, isManaged: Boolean = false, onMenuItemAction: MenuItem.() -> Unit, ) LongParameterList:OnlineTileSourceAuth.kt$OnlineTileSourceAuth$( aName: String, aZoomLevel: Int, aZoomMaxLevel: Int, aTileSizePixels: Int, aImageFileNameEnding: String, aBaseUrl: Array<String>, pCopyright: String, tileSourcePolicy: TileSourcePolicy, layerName: String?, apiKey: String ) - LongParameterList:PreferenceFooter.kt$( enabled: Boolean, @StringRes negativeText: Int, onNegativeClicked: () -> Unit, @StringRes positiveText: Int, onPositiveClicked: () -> Unit, modifier: Modifier = Modifier, ) LongParameterList:RadioInterfaceService.kt$RadioInterfaceService$( private val context: Application, private val dispatchers: CoroutineDispatchers, private val bluetoothRepository: BluetoothRepository, private val networkRepository: NetworkRepository, private val processLifecycle: Lifecycle, @RadioRepositoryQualifier private val prefs: SharedPreferences, private val interfaceFactory: InterfaceFactory, ) - LongParameterList:RegularPreference.kt$( title: String, subtitle: AnnotatedString, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, trailingIcon: ImageVector? = null, ) - LongParameterList:RegularPreference.kt$( title: String, subtitle: String, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, trailingIcon: ImageVector? = null, ) LongParameterList:UIState.kt$UIViewModel$( private val app: Application, val nodeDB: NodeDB, private val radioConfigRepository: RadioConfigRepository, private val radioInterfaceService: RadioInterfaceService, private val meshLogRepository: MeshLogRepository, private val packetRepository: PacketRepository, private val quickChatActionRepository: QuickChatActionRepository, private val preferences: SharedPreferences ) MagicNumber:BatteryInfo.kt$100 MagicNumber:BatteryInfo.kt$101 @@ -250,21 +99,12 @@ MagicNumber:BatteryInfo.kt$5 MagicNumber:BatteryInfo.kt$79 MagicNumber:BatteryInfo.kt$80 - MagicNumber:BatteryInfo.kt$BatteryInfoPreviewParameterProvider$101 - MagicNumber:BatteryInfo.kt$BatteryInfoPreviewParameterProvider$12 - MagicNumber:BatteryInfo.kt$BatteryInfoPreviewParameterProvider$28 - MagicNumber:BatteryInfo.kt$BatteryInfoPreviewParameterProvider$3.7F - MagicNumber:BatteryInfo.kt$BatteryInfoPreviewParameterProvider$4.5F - MagicNumber:BatteryInfo.kt$BatteryInfoPreviewParameterProvider$4.9F - MagicNumber:BatteryInfo.kt$BatteryInfoPreviewParameterProvider$50 - MagicNumber:BatteryInfo.kt$BatteryInfoPreviewParameterProvider$85 MagicNumber:BluetoothInterface.kt$BluetoothInterface$1000 MagicNumber:BluetoothInterface.kt$BluetoothInterface$1500 MagicNumber:BluetoothInterface.kt$BluetoothInterface$500 MagicNumber:BluetoothInterface.kt$BluetoothInterface$512 MagicNumber:BuildUtils.kt$BuildUtils$21 MagicNumber:Channel.kt$0xff - MagicNumber:Channel.kt$Channel$0xff MagicNumber:ChannelOption.kt$.03125f MagicNumber:ChannelOption.kt$.0625f MagicNumber:ChannelOption.kt$.203125f @@ -328,34 +168,15 @@ MagicNumber:ChannelOption.kt$RegionInfo.US$928.0f MagicNumber:ChannelSet.kt$40 MagicNumber:ChannelSet.kt$960 - MagicNumber:Color.kt$0x8A000000 - MagicNumber:Color.kt$0x99A6D1E6 - MagicNumber:Color.kt$0xB3FFFFFF - MagicNumber:Color.kt$0xFF03DAC5 - MagicNumber:Color.kt$0xFF3700B3 - MagicNumber:Color.kt$0xFF43C3B0 - MagicNumber:Color.kt$0xFF57AEFF - MagicNumber:Color.kt$0xFF6200EE - MagicNumber:Color.kt$0xFF67EA94 - MagicNumber:Color.kt$0xFFA6D1E6 - MagicNumber:Color.kt$0xFFBB86FC - MagicNumber:Color.kt$0xFFCFE8A9 - MagicNumber:Color.kt$0xFFFAFAFA - MagicNumber:Color.kt$0xFFFFB3B3 - MagicNumber:Color.kt$0xFFFFE6E6 MagicNumber:ContactsFragment.kt$ContactsFragment.ActionModeCallback$7 MagicNumber:ContactsFragment.kt$ContactsFragment.ActionModeCallback$8 MagicNumber:ContactsViewModel.kt$1000L MagicNumber:ContactsViewModel.kt$24 MagicNumber:ContactsViewModel.kt$60 - MagicNumber:ContactsViewModel.kt$ContactsViewModel$5_000 MagicNumber:ContextServices.kt$29 MagicNumber:ContextServices.kt$33 - MagicNumber:CustomTileSource.kt$CustomTileSource.Companion.<no name provided>$18 - MagicNumber:CustomTileSource.kt$CustomTileSource.Companion.<no name provided>$20 - MagicNumber:CustomTileSource.kt$CustomTileSource.Companion.<no name provided>$256 - MagicNumber:CustomTileSource.kt$CustomTileSource.Companion.<no name provided>$4 MagicNumber:DataPacket.kt$DataPacket.CREATOR$16 + MagicNumber:DebugFragment.kt$DebugFragment$3 MagicNumber:DeviceSettingsFragment.kt$ConfigRoute.BLUETOOTH$6 MagicNumber:DeviceSettingsFragment.kt$ConfigRoute.DISPLAY$4 MagicNumber:DeviceSettingsFragment.kt$ConfigRoute.LORA$5 @@ -431,8 +252,6 @@ MagicNumber:MarkerWithLabel.kt$MarkerWithLabel$2F MagicNumber:MarkerWithLabel.kt$MarkerWithLabel$3 MagicNumber:MarkerWithLabel.kt$MarkerWithLabel$30f - MagicNumber:MarkerWithLabel.kt$MarkerWithLabel$40f - MagicNumber:MarkerWithLabel.kt$MarkerWithLabel$80f MagicNumber:MarkerWithLabel.kt$MarkerWithLabel$8F MagicNumber:MeshService.kt$MeshService$0xffffffff MagicNumber:MeshService.kt$MeshService$0xffffffffL @@ -447,16 +266,10 @@ MagicNumber:MeshService.kt$MeshService$60 MagicNumber:MeshService.kt$MeshService$60000 MagicNumber:MeshService.kt$MeshService$8 - MagicNumber:MeshService.kt$MeshService.<no name provided>$4 - MagicNumber:MeshService.kt$MeshService.<no name provided>$5 - MagicNumber:MeshServiceNotifications.kt$MeshServiceNotifications$101 - MagicNumber:MeshServiceNotifications.kt$MeshServiceNotifications$102 MagicNumber:MessagesFragment.kt$1000L MagicNumber:MessagesFragment.kt$24 MagicNumber:MessagesFragment.kt$60 MagicNumber:MessagesFragment.kt$MessagesFragment$234 - MagicNumber:MessagesFragment.kt$MessagesFragment.<no name provided>$127 - MagicNumber:MessagesFragment.kt$MessagesFragment.<no name provided>$32f MagicNumber:MockInterface.kt$MockInterface$1.5f MagicNumber:MockInterface.kt$MockInterface$1000 MagicNumber:MockInterface.kt$MockInterface$16 @@ -464,13 +277,10 @@ MagicNumber:MockInterface.kt$MockInterface$32.776665 MagicNumber:MockInterface.kt$MockInterface$32.960758 MagicNumber:MockInterface.kt$MockInterface$35 - MagicNumber:MockInterface.kt$MockInterface$50 MagicNumber:MockInterface.kt$MockInterface$96.733521 MagicNumber:MockInterface.kt$MockInterface$96.796989 MagicNumber:NOAAWmsTileSource.kt$NOAAWmsTileSource$180 - MagicNumber:NOAAWmsTileSource.kt$NOAAWmsTileSource$20037508.34789244 MagicNumber:NOAAWmsTileSource.kt$NOAAWmsTileSource$256 - MagicNumber:NOAAWmsTileSource.kt$NOAAWmsTileSource$3 MagicNumber:NOAAWmsTileSource.kt$NOAAWmsTileSource$360.0 MagicNumber:NOAAWmsTileSource.kt$NOAAWmsTileSource$4 MagicNumber:NOAAWmsTileSource.kt$NOAAWmsTileSource$5 @@ -481,12 +291,10 @@ MagicNumber:NodeInfo.kt$EnvironmentMetrics.Companion$1000 MagicNumber:NodeInfo.kt$NodeInfo$0.114 MagicNumber:NodeInfo.kt$NodeInfo$0.299 - MagicNumber:NodeInfo.kt$NodeInfo$0.5 MagicNumber:NodeInfo.kt$NodeInfo$0.587 MagicNumber:NodeInfo.kt$NodeInfo$0x0000FF MagicNumber:NodeInfo.kt$NodeInfo$0x00FF00 MagicNumber:NodeInfo.kt$NodeInfo$0xFF0000 - MagicNumber:NodeInfo.kt$NodeInfo$100 MagicNumber:NodeInfo.kt$NodeInfo$1000 MagicNumber:NodeInfo.kt$NodeInfo$1000.0 MagicNumber:NodeInfo.kt$NodeInfo$15 @@ -514,20 +322,11 @@ MagicNumber:ProbeTableProvider.kt$ProbeTableProvider$6790 MagicNumber:ProbeTableProvider.kt$ProbeTableProvider$9114 MagicNumber:QuickChatSettingsFragment.kt$QuickChatSettingsFragment$3 - MagicNumber:RadioConfigViewModel.kt$RadioConfigViewModel$8 MagicNumber:SafeBluetooth.kt$SafeBluetooth$10 MagicNumber:SafeBluetooth.kt$SafeBluetooth$100 MagicNumber:SafeBluetooth.kt$SafeBluetooth$1000 - MagicNumber:SafeBluetooth.kt$SafeBluetooth$1000L - MagicNumber:SafeBluetooth.kt$SafeBluetooth$20 MagicNumber:SafeBluetooth.kt$SafeBluetooth$2500 - MagicNumber:SafeBluetooth.kt$SafeBluetooth$4403 - MagicNumber:SafeBluetooth.kt$SafeBluetooth$4404 - MagicNumber:SafeBluetooth.kt$SafeBluetooth$4405 - MagicNumber:SafeBluetooth.kt$SafeBluetooth$4406 - MagicNumber:SafeBluetooth.kt$SafeBluetooth.<no name provided>$133 MagicNumber:SafeBluetooth.kt$SafeBluetooth.<no name provided>$2500 - MagicNumber:SafeBluetooth.kt$SafeBluetooth.<no name provided>$257 MagicNumber:SerialConnectionImpl.kt$SerialConnectionImpl$115200 MagicNumber:SerialConnectionImpl.kt$SerialConnectionImpl$200 MagicNumber:ServiceClient.kt$ServiceClient$500 @@ -538,8 +337,6 @@ MagicNumber:SoftwareUpdateService.kt$3 MagicNumber:SoftwareUpdateService.kt$4 MagicNumber:SoftwareUpdateService.kt$8 - MagicNumber:SqlTileWriterExt.kt$SqlTileWriterExt$3 - MagicNumber:SqlTileWriterExt.kt$SqlTileWriterExt$4 MagicNumber:StreamInterface.kt$StreamInterface$0xff MagicNumber:StreamInterface.kt$StreamInterface$3 MagicNumber:StreamInterface.kt$StreamInterface$4 @@ -549,9 +346,6 @@ MagicNumber:TCPInterface.kt$TCPInterface$4403 MagicNumber:TCPInterface.kt$TCPInterface$500 MagicNumber:UIState.kt$4 - MagicNumber:UIState.kt$UIViewModel$1000 - MagicNumber:UIState.kt$UIViewModel$5_000 - MagicNumber:UIState.kt$UIViewModel$8 MatchingDeclarationName:AnalyticsClient.kt$AnalyticsProvider MatchingDeclarationName:CompatExtensions.kt$PendingIntentCompat MatchingDeclarationName:DistanceExtensions.kt$DistanceUnit @@ -576,6 +370,7 @@ MaxLineLength:BluetoothState.kt$BluetoothState$"BluetoothState(hasPermissions=$hasPermissions, enabled=$enabled, bondedDevices=${bondedDevices.map { it.anonymize }})" MaxLineLength:Channel.kt$Channel$// We have a new style 'empty' channel name. Use the same logic from the device to convert that to a human readable name MaxLineLength:Channel.kt$Channel$/// Return the name of our channel as a human readable string. If empty string, assume "Default" per mesh.proto spec + MaxLineLength:ChannelFragment.kt$color = if (!enabled) MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.disabled) else Color.Unspecified MaxLineLength:ChannelSettingsItemList.kt$color = if (!enabled) MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.disabled) else Color.Unspecified MaxLineLength:ContextServices.kt$get MaxLineLength:ContextServices.kt$val Context.locationManager: LocationManager get() = requireNotNull(getSystemService(Context.LOCATION_SERVICE) as? LocationManager?) @@ -686,8 +481,6 @@ NewLineAtEndOfFile:DataPacket.kt$com.geeksville.mesh.DataPacket.kt NewLineAtEndOfFile:DatabaseModule.kt$com.geeksville.mesh.database.DatabaseModule.kt NewLineAtEndOfFile:DateUtils.kt$com.geeksville.mesh.android.DateUtils.kt - NewLineAtEndOfFile:DebugAdapter.kt$com.geeksville.mesh.ui.DebugAdapter.kt - NewLineAtEndOfFile:DebugFragment.kt$com.geeksville.mesh.ui.DebugFragment.kt NewLineAtEndOfFile:DebugLogFile.kt$com.geeksville.mesh.android.DebugLogFile.kt NewLineAtEndOfFile:DeferredExecution.kt$com.geeksville.mesh.concurrent.DeferredExecution.kt NewLineAtEndOfFile:DeviceVersion.kt$com.geeksville.mesh.model.DeviceVersion.kt @@ -821,54 +614,22 @@ TooManyFunctions:SafeBluetooth.kt$SafeBluetooth : LoggingCloseable TooManyFunctions:SettingsFragment.kt$SettingsFragment : ScreenFragmentLogging TooManyFunctions:UIState.kt$UIViewModel : ViewModelLogging + TopLevelPropertyNaming:ChannelSet.kt$internal const val URL_PREFIX = "https://meshtastic.org/e/#" + TopLevelPropertyNaming:Constants.kt$// a bool true means now connected, false means not const val EXTRA_CONNECTED = "$prefix.Connected" + TopLevelPropertyNaming:Constants.kt$/// a bool true means we expect this condition to continue until, false means device might come back const val EXTRA_PERMANENT = "$prefix.Permanent" + TopLevelPropertyNaming:Constants.kt$const val EXTRA_NODEINFO = "$prefix.NodeInfo" + TopLevelPropertyNaming:Constants.kt$const val EXTRA_PACKET_ID = "$prefix.PacketId" + TopLevelPropertyNaming:Constants.kt$const val EXTRA_PAYLOAD = "$prefix.Payload" + TopLevelPropertyNaming:Constants.kt$const val EXTRA_PROGRESS = "$prefix.Progress" + TopLevelPropertyNaming:Constants.kt$const val EXTRA_STATUS = "$prefix.Status" TopLevelPropertyNaming:Constants.kt$const val prefix = "com.geeksville.mesh" + TopLevelPropertyNaming:UsbManager.kt$private const val ACTION_USB_PERMISSION = "com.geeksville.mesh.USB_PERMISSION" UnusedParameter:PositionPrecisionPreference.kt$modifier: Modifier = Modifier - UnusedPrivateMember:AmbientLightingConfigItemList.kt$@Preview(showBackground = true) @Composable private fun AmbientLightingConfigPreview() - UnusedPrivateMember:AudioConfigItemList.kt$@Preview(showBackground = true) @Composable private fun AudioConfigPreview() - UnusedPrivateMember:BitwisePreference.kt$@Preview(showBackground = true) @Composable private fun BitwisePreferencePreview() - UnusedPrivateMember:BluetoothConfigItemList.kt$@Preview(showBackground = true) @Composable private fun BluetoothConfigPreview() - UnusedPrivateMember:CacheLayout.kt$@Preview(showBackground = true) @Composable private fun CacheLayoutPreview() - UnusedPrivateMember:CannedMessageConfigItemList.kt$@Preview(showBackground = true) @Composable private fun CannedMessageConfigPreview() - UnusedPrivateMember:ChannelFragment.kt$@Preview(showBackground = true) @Composable private fun ChannelScreenPreview() - UnusedPrivateMember:ChannelSettingsItemList.kt$@Preview(showBackground = true) @Composable private fun ChannelSettingsPreview() - UnusedPrivateMember:ContactItem.kt$@Preview(showBackground = true) @Preview(showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_YES) @Composable private fun ContactItemPreview() - UnusedPrivateMember:DetectionSensorConfigItemList.kt$@Preview(showBackground = true) @Composable private fun DetectionSensorConfigPreview() - UnusedPrivateMember:DeviceConfigItemList.kt$@Preview(showBackground = true) @Composable private fun DeviceConfigPreview() - UnusedPrivateMember:DeviceSettingsFragment.kt$@Preview(showBackground = true) @Composable private fun RadioSettingsScreenPreview() - UnusedPrivateMember:DisplayConfigItemList.kt$@Preview(showBackground = true) @Composable private fun DisplayConfigPreview() - UnusedPrivateMember:DropDownPreference.kt$@Preview(showBackground = true) @Composable private fun DropDownPreferencePreview() - UnusedPrivateMember:EditChannelDialog.kt$@Preview(showBackground = true) @Composable private fun EditChannelDialogPreview() - UnusedPrivateMember:EditDeviceProfileDialog.kt$@Preview(showBackground = true) @Composable private fun EditDeviceProfileDialogPreview() - UnusedPrivateMember:EditIPv4Preference.kt$@Preview(showBackground = true) @Composable private fun EditIPv4PreferencePreview() - UnusedPrivateMember:EditListPreference.kt$@Preview(showBackground = true) @Composable private fun EditListPreferencePreview() - UnusedPrivateMember:EditPasswordPreference.kt$@Preview(showBackground = true) @Composable private fun EditPasswordPreferencePreview() - UnusedPrivateMember:EditTextPreference.kt$@Preview(showBackground = true) @Composable private fun EditTextPreferencePreview() - UnusedPrivateMember:EditWaypointDialog.kt$@Preview(showBackground = true) @Composable private fun EditWaypointFormPreview() - UnusedPrivateMember:ExternalNotificationConfigItemList.kt$@Preview(showBackground = true) @Composable private fun ExternalNotificationConfigPreview() - UnusedPrivateMember:IconButton.kt$@Preview(showBackground = true) @Composable private fun IconButtonsPreview() - UnusedPrivateMember:LoRaConfigItemList.kt$@Preview(showBackground = true) @Composable private fun LoRaConfigPreview() - UnusedPrivateMember:MQTTConfigItemList.kt$@Preview(showBackground = true) @Composable private fun MQTTConfigPreview() UnusedPrivateMember:MeshService.kt$MeshService$private fun processQueuedPackets() UnusedPrivateMember:MeshService.kt$MeshService$private fun requestAllConfig() UnusedPrivateMember:NOAAWmsTileSource.kt$NOAAWmsTileSource$private fun tile2lat(y: Int, z: Int): Double UnusedPrivateMember:NOAAWmsTileSource.kt$NOAAWmsTileSource$private fun tile2lon(x: Int, z: Int): Double - UnusedPrivateMember:NeighborInfoConfigItemList.kt$@Preview(showBackground = true) @Composable private fun NeighborInfoConfigPreview() - UnusedPrivateMember:NetworkConfigItemList.kt$@Preview(showBackground = true) @Composable private fun NetworkConfigPreview() - UnusedPrivateMember:PacketResponseStateDialog.kt$@Preview(showBackground = true) @Composable private fun PacketResponseStateDialogPreview() - UnusedPrivateMember:PaxcounterConfigItemList.kt$@Preview(showBackground = true) @Composable private fun PaxcounterConfigPreview() - UnusedPrivateMember:PositionConfigItemList.kt$@Preview(showBackground = true) @Composable private fun PositionConfigPreview() - UnusedPrivateMember:PowerConfigItemList.kt$@Preview(showBackground = true) @Composable private fun PowerConfigPreview() - UnusedPrivateMember:PreferenceCategory.kt$@Preview(showBackground = true) @Composable private fun PreferenceCategoryPreview() - UnusedPrivateMember:PreferenceFooter.kt$@Preview(showBackground = true) @Composable private fun PreferenceFooterPreview() - UnusedPrivateMember:RegularPreference.kt$@Preview(showBackground = true) @Composable private fun RegularPreferencePreview() - UnusedPrivateMember:RemoteHardwareConfigItemList.kt$@Preview(showBackground = true) @Composable private fun RemoteHardwareConfigPreview() UnusedPrivateMember:SafeBluetooth.kt$SafeBluetooth$private fun reconnect() - UnusedPrivateMember:SerialConfigItemList.kt$@Preview(showBackground = true) @Composable private fun SerialConfigPreview() - UnusedPrivateMember:StoreForwardConfigItemList.kt$@Preview(showBackground = true) @Composable private fun StoreForwardConfigPreview() - UnusedPrivateMember:SwitchPreference.kt$@Preview(showBackground = true) @Composable private fun SwitchPreferencePreview() - UnusedPrivateMember:TelemetryConfigItemList.kt$@Preview(showBackground = true) @Composable private fun TelemetryConfigPreview() - UnusedPrivateMember:TextDividerPreference.kt$@Preview(showBackground = true) @Composable private fun TextDividerPreferencePreview() - UnusedPrivateMember:UserConfigItemList.kt$@Preview(showBackground = true) @Composable private fun UserConfigPreview() UnusedPrivateProperty:BluetoothInterface.kt$BluetoothInterface$/// For testing @Volatile private var isFirstTime = true UnusedPrivateProperty:BluetoothInterface.kt$BluetoothInterface$/// We only force service refresh the _first_ time we connect to the device. Thereafter it is assumed the firmware didn't change private var hasForcedRefresh = false UnusedPrivateProperty:CustomTileSource.kt$CustomTileSource.Companion$private val SEAMAP: OnlineTileSourceBase = TileSourceFactory.OPEN_SEAMAP diff --git a/config/detekt/detekt.yml b/config/detekt/detekt.yml index 7615608c..f139db3c 100644 --- a/config/detekt/detekt.yml +++ b/config/detekt/detekt.yml @@ -131,9 +131,9 @@ complexity: threshold: 60 LongParameterList: active: true - functionThreshold: 6 + functionThreshold: 12 constructorThreshold: 7 - ignoreDefaultParameters: false + ignoreDefaultParameters: true ignoreDataClasses: true ignoreAnnotatedParameter: [] MethodOverloading: @@ -175,6 +175,7 @@ complexity: ignoreDeprecated: false ignorePrivate: false ignoreOverridden: false + ignoreAnnotated: ['Preview'] coroutines: active: true @@ -331,7 +332,7 @@ naming: FunctionNaming: active: true excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] - functionPattern: '[a-z][a-zA-Z0-9]*' + functionPattern: '[a-zA-Z][a-zA-Z0-9]*' excludeClassPattern: '$^' FunctionParameterNaming: active: true @@ -364,7 +365,7 @@ naming: packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*' TopLevelPropertyNaming: active: true - constantPattern: '[A-Z][_A-Z0-9]*' + constantPattern: '[A-Z][A-Za-z0-9]*' propertyPattern: '[A-Za-z][_A-Za-z0-9]*' privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*' VariableMaxLength: @@ -615,7 +616,7 @@ style: - '1' - '2' ignoreHashCodeFunction: true - ignorePropertyDeclaration: false + ignorePropertyDeclaration: true ignoreLocalVariableDeclaration: false ignoreConstantDeclaration: true ignoreCompanionObjectPropertyDeclaration: true @@ -738,6 +739,7 @@ style: UnusedPrivateMember: active: true allowedNames: '' + ignoreAnnotated: ['Preview'] UnusedPrivateProperty: active: true allowedNames: '_|ignored|expected|serialVersionUID' diff --git a/config/ktlint/baseline.xml b/config/ktlint/baseline.xml deleted file mode 100644 index 98142077..00000000 --- a/config/ktlint/baseline.xml +++ /dev/null @@ -1,3 +0,0 @@ - - -