From 58dcc3b44c2609be611984382455d1fca9c056f0 Mon Sep 17 00:00:00 2001
From: oarcher <olivier.archer@gmail.com>
Date: Fri, 31 May 2024 13:21:21 +0200
Subject: [PATCH] changed to nolint

---
 esphome/components/modem/modem_component.cpp | 5 +++--
 esphome/components/modem/modem_component.h   | 8 +++-----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/esphome/components/modem/modem_component.cpp b/esphome/components/modem/modem_component.cpp
index c99e83d1f8..5b0e7b8c26 100644
--- a/esphome/components/modem/modem_component.cpp
+++ b/esphome/components/modem/modem_component.cpp
@@ -124,7 +124,8 @@ void ModemComponent::setup() {
 
   ESP_LOGV(TAG, "DCE setup");
 
-  // clang-format off  ( create_modem_dce(dce_factory::ModemType, config, std::move(dte), netif) is private )
+  // NOLINTBEGIN(bugprone-branch-clone)
+  // ( because create_modem_dce(dce_factory::ModemType, config, std::move(dte), netif) is private )
   switch (this->model_) {
     case ModemModel::BG96:
       this->dce = create_BG96_dce(&dce_config, this->dte_, this->ppp_netif_);
@@ -143,7 +144,7 @@ void ModemComponent::setup() {
       return;
       break;
   }
-  // clang-format on
+  // NOLINTEND
 
   assert(this->dce);
 
diff --git a/esphome/components/modem/modem_component.h b/esphome/components/modem/modem_component.h
index ffe87b7a64..cd7851c625 100644
--- a/esphome/components/modem/modem_component.h
+++ b/esphome/components/modem/modem_component.h
@@ -11,14 +11,12 @@
 
 // esp_modem will use esphome logger (needed if other components include esphome/core/log.h)
 // We need to do this because "cxx_include/esp_modem_api.hpp" is not a pure C++ header, and use logging.
-// FIXME: Find another workaround. clang is currently disabled.
+// FIXME: Find another workaround ?.
 // error: using declarations in the global namespace in headers are prohibited
 // [google-global-names-in-headers,-warnings-as-errors]
-// clang-format off
-using esphome::esp_log_printf_;
-// clang-format on
+using esphome::esp_log_printf_;  // NOLINT(google-global-names-in-headers):
 
-#include <cxx_include/esp_modem_api.hpp>
+#include <cxx_include/esp_modem_api.hpp>  // NOLINT(clang-diagnostic-error)
 #include <driver/gpio.h>
 #include <esp_modem_config.h>
 #include <unordered_map>