no real good option but to disable them all manually

This commit is contained in:
J. Nick Koston 2025-07-14 09:24:38 -10:00
parent 2057af8396
commit 808066f564
No known key found for this signature in database
4 changed files with 5 additions and 0 deletions

View File

@ -32,6 +32,7 @@ std::string build_json(const json_build_t &f) {
ESP_LOGE(TAG, "Could not allocate memory for JSON document!");
return "{}";
}
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) false positive with ArduinoJson
JsonObject root = json_document.to<JsonObject>();
f(root);
if (json_document.overflowed()) {
@ -50,6 +51,7 @@ bool parse_json(const std::string &data, const json_parse_t &f) {
ESP_LOGE(TAG, "Could not allocate memory for JSON document!");
return false;
}
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) false positive with ArduinoJson
DeserializationError err = deserializeJson(json_document, data);
JsonObject root = json_document.as<JsonObject>();

View File

@ -9,6 +9,7 @@ namespace light {
// See https://www.home-assistant.io/integrations/light.mqtt/#json-schema for documentation on the schema
void LightJSONSchema::dump_json(LightState &state, JsonObject root) {
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) false positive with ArduinoJson
if (state.supports_effects())
root["effect"] = state.get_effect_name();

View File

@ -95,6 +95,7 @@ void MQTTClientComponent::send_device_info_() {
this->publish_json(
topic,
[](JsonObject root) {
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) false positive with ArduinoJson
uint8_t index = 0;
for (auto &ip : network::get_ip_addresses()) {
if (ip.is_set()) {

View File

@ -73,6 +73,7 @@ bool MQTTComponent::send_discovery_() {
return global_mqtt_client->publish_json(
this->get_discovery_topic_(discovery_info),
[this](JsonObject root) {
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) false positive with ArduinoJson
SendDiscoveryConfig config;
config.state_topic = true;
config.command_topic = true;