[code-quality] fix clang-tidy wifi related (#7254)

This commit is contained in:
tomaszduda23 2024-08-13 21:58:30 +02:00 committed by GitHub
parent f81ce2c707
commit 2e58297a16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 23 additions and 2 deletions

View file

@ -1,4 +1,5 @@
#include "wifi_component.h"
#ifdef USE_WIFI
#include <cinttypes>
#include <map>
@ -856,3 +857,4 @@ WiFiComponent *global_wifi_component; // NOLINT(cppcoreguidelines-avoid-non-con
} // namespace wifi
} // namespace esphome
#endif

View file

@ -1,9 +1,10 @@
#pragma once
#include "esphome/core/defines.h"
#ifdef USE_WIFI
#include "esphome/components/network/ip_address.h"
#include "esphome/core/automation.h"
#include "esphome/core/component.h"
#include "esphome/core/defines.h"
#include "esphome/core/helpers.h"
#include <string>
@ -442,3 +443,4 @@ template<typename... Ts> class WiFiDisableAction : public Action<Ts...> {
} // namespace wifi
} // namespace esphome
#endif

View file

@ -1,5 +1,6 @@
#include "wifi_component.h"
#ifdef USE_WIFI
#ifdef USE_ESP32_FRAMEWORK_ARDUINO
#include <esp_netif.h>
@ -802,3 +803,4 @@ network::IPAddress WiFiComponent::wifi_dns_ip_(int num) { return network::IPAddr
} // namespace esphome
#endif // USE_ESP32_FRAMEWORK_ARDUINO
#endif

View file

@ -1,6 +1,7 @@
#include "wifi_component.h"
#include "esphome/core/defines.h"
#ifdef USE_WIFI
#ifdef USE_ESP8266
#include <user_interface.h>
@ -834,3 +835,4 @@ void WiFiComponent::wifi_loop_() {}
} // namespace esphome
#endif
#endif

View file

@ -1,5 +1,6 @@
#include "wifi_component.h"
#ifdef USE_WIFI
#ifdef USE_ESP_IDF
#include <esp_event.h>
@ -1010,3 +1011,4 @@ network::IPAddress WiFiComponent::wifi_dns_ip_(int num) {
} // namespace esphome
#endif // USE_ESP_IDF
#endif

View file

@ -1,5 +1,6 @@
#include "wifi_component.h"
#ifdef USE_WIFI
#ifdef USE_LIBRETINY
#include <utility>
@ -468,3 +469,4 @@ void WiFiComponent::wifi_loop_() {}
} // namespace esphome
#endif // USE_LIBRETINY
#endif

View file

@ -1,6 +1,7 @@
#include "wifi_component.h"
#ifdef USE_WIFI
#ifdef USE_RP2040
#include "lwip/dns.h"
@ -218,3 +219,4 @@ void WiFiComponent::wifi_pre_setup_() {}
} // namespace esphome
#endif
#endif

View file

@ -1,4 +1,5 @@
#include "wifi_info_text_sensor.h"
#ifdef USE_WIFI
#include "esphome/core/log.h"
namespace esphome {
@ -15,3 +16,4 @@ void DNSAddressWifiInfo::dump_config() { LOG_TEXT_SENSOR("", "WifiInfo DNS Addre
} // namespace wifi_info
} // namespace esphome
#endif

View file

@ -3,6 +3,7 @@
#include "esphome/core/component.h"
#include "esphome/components/text_sensor/text_sensor.h"
#include "esphome/components/wifi/wifi_component.h"
#ifdef USE_WIFI
#include <array>
namespace esphome {
@ -131,3 +132,4 @@ class MacAddressWifiInfo : public Component, public text_sensor::TextSensor {
} // namespace wifi_info
} // namespace esphome
#endif

View file

@ -1,4 +1,5 @@
#include "wifi_signal_sensor.h"
#ifdef USE_WIFI
#include "esphome/core/log.h"
namespace esphome {
@ -10,3 +11,4 @@ void WiFiSignalSensor::dump_config() { LOG_SENSOR("", "WiFi Signal", this); }
} // namespace wifi_signal
} // namespace esphome
#endif

View file

@ -4,7 +4,7 @@
#include "esphome/core/helpers.h"
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/wifi/wifi_component.h"
#ifdef USE_WIFI
namespace esphome {
namespace wifi_signal {
@ -19,3 +19,4 @@ class WiFiSignalSensor : public sensor::Sensor, public PollingComponent {
} // namespace wifi_signal
} // namespace esphome
#endif