fix clang-tidy

This commit is contained in:
Tomasz Duda 2024-07-24 15:03:00 +02:00
parent dd43acf7af
commit 0c494f3650
4 changed files with 4 additions and 2 deletions

View file

@ -85,6 +85,8 @@ Checks: >-
-readability-redundant-string-init, -readability-redundant-string-init,
-readability-uppercase-literal-suffix, -readability-uppercase-literal-suffix,
-readability-use-anyofallof, -readability-use-anyofallof,
-readability-named-parameter,
-readability-braces-around-statements,
WarningsAsErrors: '*' WarningsAsErrors: '*'
AnalyzeTemporaryDtors: false AnalyzeTemporaryDtors: false
FormatStyle: google FormatStyle: google

View file

@ -3,6 +3,7 @@
#include <zephyr/kernel.h> #include <zephyr/kernel.h>
#include <zephyr/drivers/watchdog.h> #include <zephyr/drivers/watchdog.h>
#include <zephyr/sys/reboot.h> #include <zephyr/sys/reboot.h>
#include "esphome/core/hal.h"
namespace esphome { namespace esphome {

View file

@ -104,7 +104,6 @@ template<typename T> class optional { // NOLINT
has_value_ = true; has_value_ = true;
} }
private:
bool has_value_{false}; // NOLINT bool has_value_{false}; // NOLINT
value_type value_; // NOLINT value_type value_; // NOLINT
}; };

View file

@ -218,7 +218,7 @@ int main() { return 0;}
r"(-O[0-3s]|-g|-std=[^\s]+|-Wall|-Wextra|-Werror|--[^\s]+|-f[^\s]+|-m[^\s]+|-imacros\s*[^\s]+)" r"(-O[0-3s]|-g|-std=[^\s]+|-Wall|-Wextra|-Werror|--[^\s]+|-f[^\s]+|-m[^\s]+|-imacros\s*[^\s]+)"
) )
for match in flag_pattern.findall(command): for match in flag_pattern.findall(command):
flags.append(match) flags.append(match.replace("-imacros ", "-imacros"))
return flags return flags
def transform_to_idedata_format(compile_commands): def transform_to_idedata_format(compile_commands):