fix clang-tidy

This commit is contained in:
Tomasz Duda 2024-08-14 17:45:13 +02:00
parent 57b532db95
commit be6bf4ca8e
11 changed files with 29 additions and 12 deletions

View file

@ -1,4 +1,5 @@
#include "api_connection.h" #include "api_connection.h"
#ifdef USE_API
#include <cerrno> #include <cerrno>
#include <cinttypes> #include <cinttypes>
#include <utility> #include <utility>
@ -1511,3 +1512,4 @@ void APIConnection::on_fatal_error() {
} // namespace api } // namespace api
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,12 +1,13 @@
#pragma once #pragma once
#include "esphome/core/defines.h"
#ifdef USE_API
#include "api_frame_helper.h" #include "api_frame_helper.h"
#include "api_pb2.h" #include "api_pb2.h"
#include "api_pb2_service.h" #include "api_pb2_service.h"
#include "api_server.h" #include "api_server.h"
#include "esphome/core/application.h" #include "esphome/core/application.h"
#include "esphome/core/component.h" #include "esphome/core/component.h"
#include "esphome/core/defines.h"
#include <vector> #include <vector>
@ -264,3 +265,4 @@ class APIConnection : public APIServerConnection {
} // namespace api } // namespace api
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,5 +1,5 @@
#include "api_frame_helper.h" #include "api_frame_helper.h"
#ifdef USE_API
#include "esphome/core/log.h" #include "esphome/core/log.h"
#include "esphome/core/hal.h" #include "esphome/core/hal.h"
#include "esphome/core/helpers.h" #include "esphome/core/helpers.h"
@ -1028,3 +1028,4 @@ APIError APIPlaintextFrameHelper::shutdown(int how) {
} // namespace api } // namespace api
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,4 +1,5 @@
#include "api_server.h" #include "api_server.h"
#ifdef USE_API
#include <cerrno> #include <cerrno>
#include "api_connection.h" #include "api_connection.h"
#include "esphome/components/network/util.h" #include "esphome/components/network/util.h"
@ -403,3 +404,4 @@ void APIServer::on_alarm_control_panel_update(alarm_control_panel::AlarmControlP
} // namespace api } // namespace api
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,5 +1,7 @@
#pragma once #pragma once
#include "esphome/core/defines.h"
#ifdef USE_API
#include "api_noise_context.h" #include "api_noise_context.h"
#include "api_pb2.h" #include "api_pb2.h"
#include "api_pb2_service.h" #include "api_pb2_service.h"
@ -7,7 +9,6 @@
#include "esphome/core/automation.h" #include "esphome/core/automation.h"
#include "esphome/core/component.h" #include "esphome/core/component.h"
#include "esphome/core/controller.h" #include "esphome/core/controller.h"
#include "esphome/core/defines.h"
#include "esphome/core/log.h" #include "esphome/core/log.h"
#include "list_entities.h" #include "list_entities.h"
#include "subscribe_state.h" #include "subscribe_state.h"
@ -153,3 +154,4 @@ template<typename... Ts> class APIConnectedCondition : public Condition<Ts...> {
} // namespace api } // namespace api
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,9 +1,9 @@
#pragma once #pragma once
#include <map> #include <map>
#include "user_services.h"
#include "api_server.h" #include "api_server.h"
#ifdef USE_API
#include "user_services.h"
namespace esphome { namespace esphome {
namespace api { namespace api {
@ -216,3 +216,4 @@ class CustomAPIDevice {
} // namespace api } // namespace api
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,10 +1,10 @@
#pragma once #pragma once
#include "api_server.h"
#ifdef USE_API
#include "api_pb2.h"
#include "esphome/core/helpers.h" #include "esphome/core/helpers.h"
#include "esphome/core/automation.h" #include "esphome/core/automation.h"
#include "api_pb2.h"
#include "api_server.h"
#include <vector> #include <vector>
namespace esphome { namespace esphome {
@ -81,3 +81,4 @@ template<typename... Ts> class HomeAssistantServiceCallAction : public Action<Ts
} // namespace api } // namespace api
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,4 +1,5 @@
#include "list_entities.h" #include "list_entities.h"
#ifdef USE_API
#include "api_connection.h" #include "api_connection.h"
#include "esphome/core/application.h" #include "esphome/core/application.h"
#include "esphome/core/log.h" #include "esphome/core/log.h"
@ -104,3 +105,4 @@ bool ListEntitiesIterator::on_update(update::UpdateEntity *update) { return this
} // namespace api } // namespace api
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,9 +1,9 @@
#pragma once #pragma once
#include "esphome/core/defines.h"
#ifdef USE_API
#include "esphome/core/component.h" #include "esphome/core/component.h"
#include "esphome/core/component_iterator.h" #include "esphome/core/component_iterator.h"
#include "esphome/core/defines.h"
namespace esphome { namespace esphome {
namespace api { namespace api {
@ -87,3 +87,4 @@ class ListEntitiesIterator : public ComponentIterator {
} // namespace api } // namespace api
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,4 +1,5 @@
#include "subscribe_state.h" #include "subscribe_state.h"
#ifdef USE_API
#include "api_connection.h" #include "api_connection.h"
#include "esphome/core/log.h" #include "esphome/core/log.h"
@ -84,3 +85,4 @@ InitialStateIterator::InitialStateIterator(APIConnection *client) : client_(clie
} // namespace api } // namespace api
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,10 +1,10 @@
#pragma once #pragma once
#include "esphome/core/defines.h"
#ifdef USE_API
#include "esphome/core/component.h" #include "esphome/core/component.h"
#include "esphome/core/component_iterator.h" #include "esphome/core/component_iterator.h"
#include "esphome/core/controller.h" #include "esphome/core/controller.h"
#include "esphome/core/defines.h"
namespace esphome { namespace esphome {
namespace api { namespace api {
@ -82,3 +82,4 @@ class InitialStateIterator : public ComponentIterator {
} // namespace api } // namespace api
} // namespace esphome } // namespace esphome
#endif