diff --git a/lib/moment/moment.hpp b/lib/moment/moment.hpp index 873e72d..25c9a41 100644 --- a/lib/moment/moment.hpp +++ b/lib/moment/moment.hpp @@ -102,7 +102,7 @@ class Moment { _rolloverCount++; } _lastValue = value; - _milliseconds = + this->_milliseconds = static_cast(value) + static_cast(_rolloverCount) * 0xFFFFFFFFLL; } diff --git a/lib/temperature/include/temperature.hpp b/lib/temperature/include/temperature.hpp index c8d6dd3..ff5cad3 100644 --- a/lib/temperature/include/temperature.hpp +++ b/lib/temperature/include/temperature.hpp @@ -73,6 +73,7 @@ class Temperature { this->celsius = unit == Unit::C ? value : fahrenheitToCelsius(value); } + // NOLINTBEGIN(bugprone-easily-swappable-parameters) Temperature clamp(const Temperature &min, const Temperature &max) const { return Temperature(std::max(std::min(this->celsius, max.celsius), min.celsius), Unit::C); } @@ -81,6 +82,7 @@ class Temperature { celsius = std::max(std::min(this->celsius, max.celsius), min.celsius); return *this; } + // NOLINTEND(bugprone-easily-swappable-parameters) static float celsiusToFahrenheit(const float celsius) { return celsius * 9.0f / 5.0f + 32.0f; diff --git a/platformio.ini b/platformio.ini index a4b9a1c..b05d3e4 100644 --- a/platformio.ini +++ b/platformio.ini @@ -20,8 +20,8 @@ extra_scripts = check_tool = clangtidy, cppcheck check_flags = clangtidy: --checks '-*,bugprone-*,clang-analyzer-*,misc-*,performance-*,portability-*,readability-*,-readability-magic-numbers,-readability-static-accessed-through-instance,-readability-misplaced-array-index,google-*' - cppcheck: --enable=all --disable=unusedFunction --inline-suppr --std=c++20 --suppress=*:*/.pio/* --suppress=unmatchedSuppression:*/.pio/* -check_skip_packages = no + cppcheck: --enable=all --disable=unusedFunction --inline-suppr --std=c++20 --suppress=*:*/.pio/* --suppress=unmatchedSuppression:*/.pio/* --suppress=*:*/packages/* --suppress=unmatchedSuppression:*/packages/* +check_skip_packages = yes check_src_filters = + + platform_packages = platformio/tool-clangtidy@1.150005.0 @@ -66,7 +66,7 @@ framework = arduino extends = common lib_deps = ${common.lib_deps} - me-no-dev/ESP Async WebServer@1.2.3 + ESP32Async/ESPAsyncWebServer @ 3.6.0 ; ; Build settings shared across all ESP32 targets. These are appended to or overridden by the target-specific settings. @@ -83,9 +83,7 @@ build_flags = -D CORE_DEBUG_LEVEL=0 lib_deps = ${common.lib_deps} - ; latest master required for ESP32 because released version causes linker failures - ; https://github.com/me-no-dev/ESPAsyncWebServer/pull/999 - https://github.com/me-no-dev/ESPAsyncWebServer.git + ESP32Async/ESPAsyncWebServer @ 3.6.0 ; ; ESP8266 targets diff --git a/src/main.cpp b/src/main.cpp index b2bc3a6..e518ea0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -583,8 +583,10 @@ bool safeModeActive() { return config.other.safeMode && remoteTempStale(); } +// NOLINTBEGIN(readability-named-parameter) void renderView(const String &view, JsonDocument &data, const std::vector> &partials = {}) { + // NOLINTEND(readability-named-parameter) auto header = data[F("header")].to(); header[F("hostname")] = config.network.hostname; header[F("git_hash")] = F(MITSUQTT_GIT_COMMIT);