style: resolve cpplint warnings in firmware sources

Place C headers before C++ headers in sensor, metrics, utility and
application sources.

Document the owned cache of the applied MQTT prefix and suppress
runtime/string only for this variable. Preserve MQTT reconfiguration
and prefix buffer cleanup.

Validated with cpplint 2.0.2 over include, lib and src using CI filters.
This commit is contained in:
Yurii authored and Yurii committed 2026-11-23 19:25:37 +03:00
1 parent 97ac190bef
commit 7e6408ac75
7 files changed
+24 -17

No files matched your search

+5 -5
View File
@@ -1,17 +1,17 @@
#include <app.h>
#include <MycilaWebSerial.h>
#include <esp_log_color.h>
#include <esp_private/log_format.h>
#include <esp_private/log_timestamp.h>
#include <esp_rom_sys.h>
#include <freertos/ringbuf.h>
#include <algorithm>
#include <atomic>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <esp_log_color.h>
#include <esp_private/log_format.h>
#include <esp_private/log_timestamp.h>
#include <esp_rom_sys.h>
#include <freertos/ringbuf.h>
static_assert(CONFIG_LOG_VERSION == 2, "OTGateway requires an SDK built with Log v2");
static_assert(CONFIG_LOG_DYNAMIC_LEVEL_CONTROL, "Runtime log levels require dynamic level control");
+2 -1
View File
@@ -2,9 +2,10 @@
#include <app.h>
#include <metrics.h>
#include <cstdlib>
#include <esp_system.h>
#include <cstdlib>
#if ARDUINO_USB_CDC_ON_BOOT && !ARDUINO_USB_MODE
#include <USB.h>
#endif
+3 -1
View File
@@ -21,7 +21,9 @@
std::mutex mqttMutex;
static MQTT* mqttClient = nullptr;
static std::string mqttPrefix;
// Keep the applied prefix separate from settings until MQTT is reconfigured.
static std::string mqttPrefix; // NOLINT(runtime/string)
static std::atomic<unsigned long> mqttConnectedAt{0};
static unsigned long mqttPublishedSensorAt[SENSORS_AMOUNT] = {};
+4 -3
View File
@@ -1,15 +1,16 @@
#define LOG_LOCAL_LEVEL ESP_LOG_VERBOSE
#include <app.h>
#include <atomic>
#include <optional>
#include <unordered_map>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <esp32DHT.h>
#include <math.h>
#include <string.h>
#include <atomic>
#include <optional>
#include <unordered_map>
#if USE_BLE
#include <NimBLEDevice.h>
#endif