Bump clang-tidy from 11 to 14 (#5160)

This commit is contained in:
Sergey Dudanov
2023-07-30 23:44:56 +04:00
committed by GitHub
parent 3eff7e76aa
commit cd72a2ed7e
17 changed files with 37 additions and 31 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ void HOT Logger::log_message_(int level, const char *tag, int offset) {
#elif defined(USE_ESP32_VARIANT_ESP32S3)
uart_ == UART_SELECTION_USB_CDC || uart_ == UART_SELECTION_USB_SERIAL_JTAG
#else
/* DISABLES CODE */ (false)
/* DISABLES CODE */ (false) // NOLINT
#endif
) {
puts(msg);
@@ -89,11 +89,13 @@ void MatrixKeypad::loop() {
void MatrixKeypad::dump_config() {
ESP_LOGCONFIG(TAG, "Matrix Keypad:");
ESP_LOGCONFIG(TAG, " Rows:");
for (auto &pin : this->rows_)
for (auto &pin : this->rows_) {
LOG_PIN(" Pin: ", pin);
}
ESP_LOGCONFIG(TAG, " Cols:");
for (auto &pin : this->columns_)
for (auto &pin : this->columns_) {
LOG_PIN(" Pin: ", pin);
}
}
void MatrixKeypad::register_listener(MatrixKeypadListener *listener) { this->listeners_.push_back(listener); }
@@ -22,8 +22,6 @@ class MideaData {
MideaData(const std::vector<uint8_t> &data) {
std::copy_n(data.begin(), std::min(data.size(), this->data_.size()), this->data_.begin());
}
// Default copy constructor
MideaData(const MideaData &) = default;
uint8_t *data() { return this->data_.data(); }
const uint8_t *data() const { return this->data_.data(); }
@@ -21,8 +21,7 @@ void SPISSD1322::setup() {
void SPISSD1322::dump_config() {
LOG_DISPLAY("", "SPI SSD1322", this);
ESP_LOGCONFIG(TAG, " Model: %s", this->model_str_());
if (this->cs_)
LOG_PIN(" CS Pin: ", this->cs_);
LOG_PIN(" CS Pin: ", this->cs_);
LOG_PIN(" DC Pin: ", this->dc_pin_);
LOG_PIN(" Reset Pin: ", this->reset_pin_);
ESP_LOGCONFIG(TAG, " Initial Brightness: %.2f", this->brightness_);
@@ -21,8 +21,7 @@ void SPISSD1325::setup() {
void SPISSD1325::dump_config() {
LOG_DISPLAY("", "SPI SSD1325", this);
ESP_LOGCONFIG(TAG, " Model: %s", this->model_str_());
if (this->cs_)
LOG_PIN(" CS Pin: ", this->cs_);
LOG_PIN(" CS Pin: ", this->cs_);
LOG_PIN(" DC Pin: ", this->dc_pin_);
LOG_PIN(" Reset Pin: ", this->reset_pin_);
ESP_LOGCONFIG(TAG, " Initial Brightness: %.2f", this->brightness_);
@@ -21,8 +21,7 @@ void SPISSD1327::setup() {
void SPISSD1327::dump_config() {
LOG_DISPLAY("", "SPI SSD1327", this);
ESP_LOGCONFIG(TAG, " Model: %s", this->model_str_());
if (this->cs_)
LOG_PIN(" CS Pin: ", this->cs_);
LOG_PIN(" CS Pin: ", this->cs_);
LOG_PIN(" DC Pin: ", this->dc_pin_);
LOG_PIN(" Reset Pin: ", this->reset_pin_);
ESP_LOGCONFIG(TAG, " Initial Brightness: %.2f", this->brightness_);
@@ -20,8 +20,7 @@ void SPISSD1331::setup() {
}
void SPISSD1331::dump_config() {
LOG_DISPLAY("", "SPI SSD1331", this);
if (this->cs_)
LOG_PIN(" CS Pin: ", this->cs_);
LOG_PIN(" CS Pin: ", this->cs_);
LOG_PIN(" DC Pin: ", this->dc_pin_);
LOG_PIN(" Reset Pin: ", this->reset_pin_);
ESP_LOGCONFIG(TAG, " Initial Brightness: %.2f", this->brightness_);
@@ -21,8 +21,7 @@ void SPISSD1351::setup() {
void SPISSD1351::dump_config() {
LOG_DISPLAY("", "SPI SSD1351", this);
ESP_LOGCONFIG(TAG, " Model: %s", this->model_str_());
if (this->cs_)
LOG_PIN(" CS Pin: ", this->cs_);
LOG_PIN(" CS Pin: ", this->cs_);
LOG_PIN(" DC Pin: ", this->dc_pin_);
LOG_PIN(" Reset Pin: ", this->reset_pin_);
ESP_LOGCONFIG(TAG, " Initial Brightness: %.2f", this->brightness_);
+1 -2
View File
@@ -27,8 +27,7 @@ void TLC5947::dump_config() {
LOG_PIN(" Data Pin: ", this->data_pin_);
LOG_PIN(" Clock Pin: ", this->clock_pin_);
LOG_PIN(" LAT Pin: ", this->lat_pin_);
if (this->outenable_pin_ != nullptr)
LOG_PIN(" OE Pin: ", this->outenable_pin_);
LOG_PIN(" OE Pin: ", this->outenable_pin_);
ESP_LOGCONFIG(TAG, " Number of chips: %u", this->num_chips_);
}
@@ -147,8 +147,9 @@ void VBusCustomBSensor::dump_config() {
ESP_LOGCONFIG(TAG, " Command: 0x%04x", this->command_);
}
ESP_LOGCONFIG(TAG, " Binary Sensors:");
for (VBusCustomSubBSensor *bsensor : this->bsensors_)
for (VBusCustomSubBSensor *bsensor : this->bsensors_) {
LOG_BINARY_SENSOR(" ", "-", bsensor);
}
}
void VBusCustomBSensor::handle_message(std::vector<uint8_t> &message) {
@@ -232,8 +232,9 @@ void VBusCustomSensor::dump_config() {
ESP_LOGCONFIG(TAG, " Command: 0x%04x", this->command_);
}
ESP_LOGCONFIG(TAG, " Sensors:");
for (VBusCustomSubSensor *sensor : this->sensors_)
for (VBusCustomSubSensor *sensor : this->sensors_) {
LOG_SENSOR(" ", "-", sensor);
}
}
void VBusCustomSensor::handle_message(std::vector<uint8_t> &message) {
@@ -6,7 +6,6 @@
#include "esphome/core/automation.h"
#include "esphome/core/component.h"
#include "esphome/core/defines.h"
#include "esphome/core/helpers.h"
#include "esphome/components/api/api_pb2.h"
@@ -220,7 +220,7 @@ bool WiFiComponent::wifi_sta_connect_(const WiFiAP &ap) {
esp_err_t err;
esp_wifi_get_config(WIFI_IF_STA, &current_conf);
if (memcmp(&current_conf, &conf, sizeof(wifi_config_t)) != 0) {
if (memcmp(&current_conf, &conf, sizeof(wifi_config_t)) != 0) { // NOLINT
err = esp_wifi_disconnect();
if (err != ESP_OK) {
ESP_LOGV(TAG, "esp_wifi_disconnect failed! %d", err);
@@ -333,7 +333,7 @@ bool WiFiComponent::wifi_sta_connect_(const WiFiAP &ap) {
// can continue
}
if (memcmp(&current_conf, &conf, sizeof(wifi_config_t)) != 0) {
if (memcmp(&current_conf, &conf, sizeof(wifi_config_t)) != 0) { // NOLINT
err = esp_wifi_disconnect();
if (err != ESP_OK) {
ESP_LOGV(TAG, "esp_wifi_disconnect failed: %s", esp_err_to_name(err));