refactor(build): build-logic cleanup, CC safety, and detekt 2.0 upgrade (#5311)

This commit is contained in:
James Rich
2026-04-30 21:48:37 -05:00
committed by GitHub
parent a7f3ef699e
commit 2822290908
942 changed files with 2671 additions and 1806 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025-2026 Meshtastic LLC
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -2,6 +2,6 @@
<SmellBaseline>
<ManuallySuppressedIssues/>
<CurrentIssues>
<ID>CyclomaticComplexMethod:ModuleConfigDataSource.kt$ModuleConfigDataSource$suspend fun setLocalModuleConfig(config: ModuleConfig)</ID>
<ID>CyclomaticComplexMethod:ModuleConfigDataSource.kt:ModuleConfigDataSource$suspend fun setLocalModuleConfig</ID>
</CurrentIssues>
</SmellBaseline>
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025-2026 Meshtastic LLC
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025-2026 Meshtastic LLC
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025-2026 Meshtastic LLC
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025-2026 Meshtastic LLC
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025-2026 Meshtastic LLC
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -50,19 +50,34 @@ class ModuleConfigDataSource(
suspend fun setLocalModuleConfig(config: ModuleConfig) = moduleConfigStore.updateData { current ->
when {
config.mqtt != null -> current.copy(mqtt = config.mqtt)
config.serial != null -> current.copy(serial = config.serial)
config.external_notification != null -> current.copy(external_notification = config.external_notification)
config.external_notification != null ->
current.copy(external_notification = config.external_notification)
config.store_forward != null -> current.copy(store_forward = config.store_forward)
config.range_test != null -> current.copy(range_test = config.range_test)
config.telemetry != null -> current.copy(telemetry = config.telemetry)
config.canned_message != null -> current.copy(canned_message = config.canned_message)
config.audio != null -> current.copy(audio = config.audio)
config.remote_hardware != null -> current.copy(remote_hardware = config.remote_hardware)
config.neighbor_info != null -> current.copy(neighbor_info = config.neighbor_info)
config.ambient_lighting != null -> current.copy(ambient_lighting = config.ambient_lighting)
config.detection_sensor != null -> current.copy(detection_sensor = config.detection_sensor)
config.paxcounter != null -> current.copy(paxcounter = config.paxcounter)
config.statusmessage != null -> current.copy(statusmessage = config.statusmessage)
else -> current
}
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025-2026 Meshtastic LLC
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025-2026 Meshtastic LLC
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025-2026 Meshtastic LLC
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025-2026 Meshtastic LLC
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025-2026 Meshtastic LLC
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025-2026 Meshtastic LLC
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025-2026 Meshtastic LLC
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -275,9 +275,11 @@ private class LegacyParsingHarness(private val rawJson: String) {
null
}
}
is JsonPrimitive -> {
item.contentOrNull?.let { RecentAddress(address = it, name = "Meshtastic") }
}
is JsonArray -> null
}
},