Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace custom StringView with standard library std::string_view #280

Merged
merged 7 commits into from
Sep 6, 2024

Conversation

hhvrc
Copy link
Member

@hhvrc hhvrc commented Sep 6, 2024

No description provided.

@hhvrc hhvrc self-assigned this Sep 6, 2024
@hhvrc hhvrc added this to the ESP-IDF milestone Sep 6, 2024
Copy link
Contributor

github-actions bot commented Sep 6, 2024

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format reports: 5 file(s) not formatted
  • include/Common.h
  • include/SemVer.h
  • src/SemVer.cpp
  • src/http/JsonAPI.cpp
  • src/util/StringUtils.cpp
clang-tidy reports: 207 concern(s)
  • include/CaptivePortal.h:3:10: error: [clang-diagnostic-error]

    'freertos/portmacro.h' file not found

        3 | #include <freertos/portmacro.h>
          |          ^~~~~~~~~~~~~~~~~~~~~~
  • include/CaptivePortal.h:8:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

        8 | namespace OpenShock::CaptivePortal {
          |           ^
  • include/CaptivePortalInstance.h:15:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

       15 | namespace OpenShock {
          |           ^
  • include/Common.h:3:10: error: [clang-diagnostic-error]

    'cstdint' file not found

        3 | #include <cstdint>
          |          ^~~~~~~~~
  • include/Common.h:10:12: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

       10 |   TypeName(TypeName&&) = delete;           \
          |            ^       
          |            (       )
  • include/Common.h:11:18: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

       11 |   void operator=(TypeName&&) = delete
          |                  ^       
          |                  (       )
  • include/Common.h:60:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

       60 | namespace OpenShock::Constants {
          |           ^
  • include/GatewayClient.h:3:10: error: [clang-diagnostic-error]

    'WebSocketsClient.h' file not found

        3 | #include <WebSocketsClient.h>
          |          ^~~~~~~~~~~~~~~~~~~~
  • include/GatewayClient.h:10:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

       10 | namespace OpenShock {
          |           ^
  • include/GatewayConnectionManager.h:9:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

        9 | namespace OpenShock::GatewayConnectionManager {
          |           ^
  • include/SemVer.h:3:10: error: [clang-diagnostic-error]

    'cstdint' file not found

        3 | #include <cstdint>
          |          ^~~~~~~~~
  • include/SemVer.h:7:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

        7 | namespace OpenShock {
          |           ^
  • include/config/BackendConfig.h:3:10: error: [clang-diagnostic-error]

    'config/ConfigBase.h' file not found

        3 | #include "config/ConfigBase.h"
          |          ^~~~~~~~~~~~~~~~~~~~~
  • include/config/BackendConfig.h:8:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

        8 | namespace OpenShock::Config {
          |           ^
  • include/config/Config.h:3:10: error: [clang-diagnostic-error]

    'config/BackendConfig.h' file not found

        3 | #include "config/BackendConfig.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~
  • include/config/Config.h:15:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

       15 | namespace OpenShock::Config {
          |           ^
  • include/config/WiFiConfig.h:3:10: error: [clang-diagnostic-error]

    'config/ConfigBase.h' file not found

        3 | #include "config/ConfigBase.h"
          |          ^~~~~~~~~~~~~~~~~~~~~
  • include/config/WiFiConfig.h:10:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

       10 | namespace OpenShock::Config {
          |           ^
  • include/config/WiFiCredentials.h:3:10: error: [clang-diagnostic-error]

    'config/ConfigBase.h' file not found

        3 | #include "config/ConfigBase.h"
          |          ^~~~~~~~~~~~~~~~~~~~~
  • include/config/WiFiCredentials.h:8:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

        8 | namespace OpenShock::Config {
          |           ^
  • include/http/HTTPRequestManager.h:3:10: error: [clang-diagnostic-error]

    'Arduino.h' file not found

        3 | #include <Arduino.h>
          |          ^~~~~~~~~~~
  • include/http/HTTPRequestManager.h:12:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

       12 | namespace OpenShock::HTTP {
          |           ^
  • include/http/JsonAPI.h:3:10: error: [clang-diagnostic-error]

    'http/HTTPRequestManager.h' file not found

        3 | #include "http/HTTPRequestManager.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  • include/http/JsonAPI.h:8:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

        8 | namespace OpenShock::HTTP::JsonAPI {
          |           ^
  • include/intconv.h:3:10: error: [clang-diagnostic-error]

    'cstdint' file not found

        3 | #include <cstdint>
          |          ^~~~~~~~~
  • include/intconv.h:6:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

        6 | namespace OpenShock::IntConv {
          |           ^
  • include/serialization/WSGateway.h:3:10: error: [clang-diagnostic-error]

    'FirmwareBootType.h' file not found

        3 | #include "FirmwareBootType.h"
          |          ^~~~~~~~~~~~~~~~~~~~
  • include/serialization/WSGateway.h:11:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

       11 | namespace OpenShock::Serialization::Gateway {
          |           ^
  • include/util/IPAddressUtils.h:3:10: error: [clang-diagnostic-error]

    'IPAddress.h' file not found

        3 | #include <IPAddress.h>
          |          ^~~~~~~~~~~~~
  • include/util/IPAddressUtils.h:7:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

        7 | namespace OpenShock {
          |           ^
  • include/util/PartitionUtils.h:3:10: error: [clang-diagnostic-error]

    'esp_partition.h' file not found

        3 | #include <esp_partition.h>
          |          ^~~~~~~~~~~~~~~~~
  • include/util/PartitionUtils.h:9:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

        9 | namespace OpenShock {
          |           ^
  • include/util/StringUtils.h:3:10: error: [clang-diagnostic-error]

    'WString.h' file not found

        3 | #include <WString.h>
          |          ^~~~~~~~~~~
  • include/util/StringUtils.h:11:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

       11 | namespace OpenShock {
          |           ^
  • include/wifi/WiFiManager.h:3:10: error: [clang-diagnostic-error]

    'wifi/WiFiNetwork.h' file not found

        3 | #include "wifi/WiFiNetwork.h"
          |          ^~~~~~~~~~~~~~~~~~~~
  • include/wifi/WiFiManager.h:10:11: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'OpenShock' is non-const and globally accessible, consider making it const

       10 | namespace OpenShock::WiFiManager {
          |           ^
  • src/CaptivePortal.cpp:1:10: error: [clang-diagnostic-error]

    'freertos/FreeRTOS.h' file not found

        1 | #include <freertos/FreeRTOS.h>
          |          ^~~~~~~~~~~~~~~~~~~~~
  • src/EStopManager.cpp:1:10: error: [clang-diagnostic-error]

    'freertos/FreeRTOS.h' file not found

        1 | #include <freertos/FreeRTOS.h>
          |          ^~~~~~~~~~~~~~~~~~~~~
  • src/GatewayClient.cpp:1:10: error: [clang-diagnostic-error]

    'GatewayClient.h' file not found

        1 | #include "GatewayClient.h"
          |          ^~~~~~~~~~~~~~~~~
  • src/GatewayConnectionManager.cpp:1:10: error: [clang-diagnostic-error]

    'GatewayConnectionManager.h' file not found

        1 | #include "GatewayConnectionManager.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • src/GatewayConnectionManager.cpp:151:6: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      151 | bool FetchDeviceInfo(std::string_view authToken) {
          | ~~~~ ^
          | auto                                             -> bool
  • src/OtaUpdateManager.cpp:1:10: error: [clang-diagnostic-error]

    'OtaUpdateManager.h' file not found

        1 | #include "OtaUpdateManager.h"
          |          ^~~~~~~~~~~~~~~~~~~~
  • src/OtaUpdateManager.cpp:32:9: warning: [cppcoreguidelines-macro-usage]

    function-like macro 'OPENSHOCK_FW_CDN_CHANNEL_URL' used; consider a 'constexpr' template function

       32 | #define OPENSHOCK_FW_CDN_CHANNEL_URL(ch) OPENSHOCK_FW_CDN_URL("/version-" ch ".txt")
          |         ^
  • src/OtaUpdateManager.cpp:121:6: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_sendFailureMessage', which is reserved in the global namespace

      121 | bool _sendFailureMessage(std::string_view message, bool fatal = false) {
          |      ^~~~~~~~~~~~~~~~~~~
          |      sendFailureMessage
  • src/OtaUpdateManager.cpp:121:6: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      121 | bool _sendFailureMessage(std::string_view message, bool fatal = false) {
          | ~~~~ ^
          | auto                                                                   -> bool
  • src/OtaUpdateManager.cpp:122:11: warning: [cppcoreguidelines-init-variables]

    variable 'updateId' is not initialized

      122 |   int32_t updateId;
          |           ^       
          |                    = 0
  • src/OtaUpdateManager.cpp:136:6: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_flashAppPartition', which is reserved in the global namespace

      136 | bool _flashAppPartition(const esp_partition_t* partition, std::string_view remoteUrl, const uint8_t (&remoteHash)[32]) {
          |      ^~~~~~~~~~~~~~~~~~
          |      flashAppPartition
  • src/OtaUpdateManager.cpp:136:6: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      136 | bool _flashAppPartition(const esp_partition_t* partition, std::string_view remoteUrl, const uint8_t (&remoteHash)[32]) {
          | ~~~~ ^
          | auto                                                                                                                   -> bool
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:136:93: warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays]
      136 | bool _flashAppPartition(const esp_partition_t* partition, std::string_view remoteUrl, const uint8_t (&remoteHash)[32]) {
          |                                                                                             ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:136:115: warning: 32 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
      136 | bool _flashAppPartition(const esp_partition_t* partition, std::string_view remoteUrl, const uint8_t (&remoteHash)[32]) {
          |                                                                                                                   ^
  • src/OtaUpdateManager.cpp:171:6: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_flashFilesystemPartition', which is reserved in the global namespace

      171 | bool _flashFilesystemPartition(const esp_partition_t* parition, std::string_view remoteUrl, const uint8_t (&remoteHash)[32]) {
          |      ^~~~~~~~~~~~~~~~~~~~~~~~~
          |      flashFilesystemPartition
  • src/OtaUpdateManager.cpp:171:6: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      171 | bool _flashFilesystemPartition(const esp_partition_t* parition, std::string_view remoteUrl, const uint8_t (&remoteHash)[32]) {
          | ~~~~ ^
          | auto                                                                                                                         -> bool
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:171:99: warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays]
      171 | bool _flashFilesystemPartition(const esp_partition_t* parition, std::string_view remoteUrl, const uint8_t (&remoteHash)[32]) {
          |                                                                                                   ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:171:121: warning: 32 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
      171 | bool _flashFilesystemPartition(const esp_partition_t* parition, std::string_view remoteUrl, const uint8_t (&remoteHash)[32]) {
          |                                                                                                                         ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:209:37: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
      209 |   if (!test.begin(false, "/static", 10, "static0")) {
          |                                     ^
  • src/OtaUpdateManager.cpp:221:6: warning: [readability-function-cognitive-complexity]

    function '_otaUpdateTask' has cognitive complexity of 51 (threshold 25)

      221 | void _otaUpdateTask(void* arg) {
          |      ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:231:3: note: +1, including nesting penalty of 0, nesting level increased to 1
      231 |   while (true) {
          |   ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:238:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      238 |     if ((eventBits & OTA_TASK_EVENT_WIFI_DISCONNECTED) != 0) {
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:244:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      244 |     if ((eventBits & OTA_TASK_EVENT_WIFI_CONNECTED) != 0 && !connected) {
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:244:58: note: +1
      244 |     if ((eventBits & OTA_TASK_EVENT_WIFI_CONNECTED) != 0 && !connected) {
          |                                                          ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:250:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      250 |     if (!connected) {
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:257:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      257 |     if (!Config::GetOtaUpdateConfig(config)) {
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:262:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      262 |     if (!config.isEnabled) {
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:272:36: note: +1
      272 |     check |= config.checkOnStartup && firstCheck;                           // On startup
          |                                    ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:273:39: note: +1
      273 |     check |= config.checkPeriodically && diffMins >= config.checkInterval;  // Periodically
          |                                       ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:274:30: note: +1
      274 |     check |= updateRequested && (firstCheck || diffMins >= 1);              // Update requested
          |                              ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:274:45: note: +1
      274 |     check |= updateRequested && (firstCheck || diffMins >= 1);              // Update requested
          |                                             ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:276:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      276 |     if (!check) {
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:282:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      282 |     if (config.requireManualApproval) {
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:289:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      289 |     if (updateRequested) {
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:292:7: note: +3, including nesting penalty of 2, nesting level increased to 3
      292 |       if (!_tryGetRequestedVersion(version)) {
          |       ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:298:7: note: +1, nesting level increased to 2
      298 |     } else {
          |       ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:302:7: note: +3, including nesting penalty of 2, nesting level increased to 3
      302 |       if (!OtaUpdateManager::TryGetFirmwareVersion(config.updateChannel, version)) {
          |       ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:310:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      310 |     if (version.toString() == OPENSHOCK_FW_VERSION) {  // TODO: This is abusing the SemVer::toString() method causing alot of string copies, fix this
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:317:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      317 |     if (!Config::SetOtaUpdateId(updateId)) {
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:321:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      321 |     if (!Config::SetOtaUpdateStep(OpenShock::OtaUpdateStep::Updating)) {
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:326:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      326 |     if (!Serialization::Gateway::SerializeOtaInstallStartedMessage(updateId, version, GatewayConnectionManager::SendMessageBIN)) {
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:331:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      331 |     if (!_sendProgressMessage(Serialization::Gateway::OtaInstallProgressTask::FetchingMetadata, 0.0f)) {
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:337:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      337 |     if (!OtaUpdateManager::TryGetFirmwareRelease(version, release)) {
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:353:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      353 |     if (appPartition == nullptr) {
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:361:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      361 |     if (filesystemPartition == nullptr) {
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:372:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      372 |     if (!_flashFilesystemPartition(filesystemPartition, release.filesystemBinaryUrl, release.filesystemBinaryHash)) continue;
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:373:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      373 |     if (!_flashAppPartition(appPartition, release.appBinaryUrl, release.appBinaryHash)) continue;
          |     ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:376:5: note: +2, including nesting penalty of 1, nesting level increased to 2
      376 |     if (!Config::SetOtaUpdateStep(OpenShock::OtaUpdateStep::Updated)) {
          |     ^
  • src/OtaUpdateManager.cpp:398:6: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_tryGetStringList', which is reserved in the global namespace

      398 | bool _tryGetStringList(std::string_view url, std::vector<std::string>& list) {
          |      ^~~~~~~~~~~~~~~~~
          |      tryGetStringList
  • src/OtaUpdateManager.cpp:398:6: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable '_tryGetStringList' is non-const and globally accessible, consider making it const

  • src/OtaUpdateManager.cpp:543:6: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_tryParseIntoHash', which is reserved in the global namespace

      543 | bool _tryParseIntoHash(std::string_view hash, uint8_t (&hashBytes)[32]) {
          |      ^~~~~~~~~~~~~~~~~
          |      tryParseIntoHash
  • src/OtaUpdateManager.cpp:543:6: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      543 | bool _tryParseIntoHash(std::string_view hash, uint8_t (&hashBytes)[32]) {
          | ~~~~ ^
          | auto                                                                    -> bool
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:543:47: warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays]
      543 | bool _tryParseIntoHash(std::string_view hash, uint8_t (&hashBytes)[32]) {
          |                                               ^
    /home/runner/work/Firmware/Firmware/src/OtaUpdateManager.cpp:543:68: warning: 32 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
      543 | bool _tryParseIntoHash(std::string_view hash, uint8_t (&hashBytes)[32]) {
          |                                                                    ^
  • src/SemVer.cpp:1:10: error: [clang-diagnostic-error]

    'SemVer.h' file not found

        1 | #include "SemVer.h"
          |          ^~~~~~~~~~
  • src/SemVer.cpp:10:16: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_semverIsLetter', which is reserved in the global namespace

       10 | constexpr bool _semverIsLetter(char c) {
          |                ^~~~~~~~~~~~~~~
          |                semverIsLetter
  • src/SemVer.cpp:10:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       10 | constexpr bool _semverIsLetter(char c) {
          |           ~~~~ ^
          |           auto                         -> bool
  • src/SemVer.cpp:10:37: warning: [readability-identifier-length]

    parameter name 'c' is too short, expected at least 3 characters

       10 | constexpr bool _semverIsLetter(char c) {
          |                                     ^
  • src/SemVer.cpp:16:16: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_semverIsDigit', which is reserved in the global namespace

       16 | constexpr bool _semverIsDigit(char c) {
          |                ^~~~~~~~~~~~~~
          |                semverIsDigit
  • src/SemVer.cpp:16:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       16 | constexpr bool _semverIsDigit(char c) {
          |           ~~~~ ^
          |           auto                        -> bool
  • src/SemVer.cpp:16:36: warning: [readability-identifier-length]

    parameter name 'c' is too short, expected at least 3 characters

       16 | constexpr bool _semverIsDigit(char c) {
          |                                    ^
  • src/SemVer.cpp:19:16: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_semverIsDigits', which is reserved in the global namespace

       19 | constexpr bool _semverIsDigits(std::string_view str) {
          |                ^~~~~~~~~~~~~~~
          |                semverIsDigits
  • src/SemVer.cpp:19:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       19 | constexpr bool _semverIsDigits(std::string_view str) {
          |           ~~~~ ^
          |           auto                                       -> bool
  • src/SemVer.cpp:21:12: warning: [readability-simplify-boolean-expr]

    redundant boolean literal in conditional return statement

       20 |   if (str.empty()) {
          |   ~~~~~~~~~~~~~~~~~~
          |   return !static_cast<bool>(str.empty())
       21 |     return false;
          |     ~~~~~~~^~~~~~
       22 |   }
          |   ~
       23 | 
       24 |   for (auto c : str) {
          |   ~~~~~~~~~~~~~~~~~~~~
       25 |     if (!_semverIsDigit(c)) {
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~
       26 |       return false;
          |       ~~~~~~~~~~~~~
       27 |     }
          |     ~
       28 |   }
          |   ~
       29 | 
       30 |   return true;
          |   ~~~~~~~~~~~
  • src/SemVer.cpp:35:16: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_semverIsIdentifierChararacter', which is reserved in the global namespace

       35 | constexpr bool _semverIsIdentifierChararacter(char c) {
          |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                semverIsIdentifierChararacter
  • src/SemVer.cpp:35:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       35 | constexpr bool _semverIsIdentifierChararacter(char c) {
          |           ~~~~ ^
          |           auto                                        -> bool
  • src/SemVer.cpp:35:52: warning: [readability-identifier-length]

    parameter name 'c' is too short, expected at least 3 characters

       35 | constexpr bool _semverIsIdentifierChararacter(char c) {
          |                                                    ^
  • src/SemVer.cpp:38:16: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_semverIsIdentifierChararacters', which is reserved in the global namespace

       38 | constexpr bool _semverIsIdentifierChararacters(std::string_view str) {
          |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                semverIsIdentifierChararacters
  • src/SemVer.cpp:38:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       38 | constexpr bool _semverIsIdentifierChararacters(std::string_view str) {
          |           ~~~~ ^
          |           auto                                                       -> bool
  • src/SemVer.cpp:40:12: warning: [readability-simplify-boolean-expr]

    redundant boolean literal in conditional return statement

       39 |   if (str.empty()) {
          |   ~~~~~~~~~~~~~~~~~~
          |   return !static_cast<bool>(str.empty())
       40 |     return false;
          |     ~~~~~~~^~~~~~
       41 |   }
          |   ~
       42 | 
       43 |   for (auto c : str) {
          |   ~~~~~~~~~~~~~~~~~~~~
       44 |     if (!_semverIsIdentifierChararacter(c)) {
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       45 |       return false;
          |       ~~~~~~~~~~~~~
       46 |     }
          |     ~
       47 |   }
          |   ~
       48 | 
       49 |   return true;
          |   ~~~~~~~~~~~
  • src/SemVer.cpp:51:16: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_semverIsNumericIdentifier', which is reserved in the global namespace

       51 | constexpr bool _semverIsNumericIdentifier(std::string_view str) {
          |                ^~~~~~~~~~~~~~~~~~~~~~~~~~
          |                semverIsNumericIdentifier
  • src/SemVer.cpp:51:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       51 | constexpr bool _semverIsNumericIdentifier(std::string_view str) {
          |           ~~~~ ^
          |           auto                                                  -> bool
  • src/SemVer.cpp:62:16: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_semverIsAlphanumericIdentifier', which is reserved in the global namespace

       62 | constexpr bool _semverIsAlphanumericIdentifier(std::string_view str) {
          |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                semverIsAlphanumericIdentifier
  • src/SemVer.cpp:62:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       62 | constexpr bool _semverIsAlphanumericIdentifier(std::string_view str) {
          |           ~~~~ ^
          |           auto                                                       -> bool
  • src/SemVer.cpp:97:16: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_semverIsBuildIdentifier', which is reserved in the global namespace

       97 | constexpr bool _semverIsBuildIdentifier(std::string_view str) {
          |                ^~~~~~~~~~~~~~~~~~~~~~~~
          |                semverIsBuildIdentifier
  • src/SemVer.cpp:97:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       97 | constexpr bool _semverIsBuildIdentifier(std::string_view str) {
          |           ~~~~ ^
          |           auto                                                -> bool
  • src/SemVer.cpp:100:16: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_semverIsPrereleaseIdentifier', which is reserved in the global namespace

      100 | constexpr bool _semverIsPrereleaseIdentifier(std::string_view str) {
          |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                semverIsPrereleaseIdentifier
  • src/SemVer.cpp:100:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      100 | constexpr bool _semverIsPrereleaseIdentifier(std::string_view str) {
          |           ~~~~ ^
          |           auto                                                     -> bool
  • src/SemVer.cpp:103:16: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_semverIsDotSeperatedBuildIdentifiers', which is reserved in the global namespace

      103 | constexpr bool _semverIsDotSeperatedBuildIdentifiers(std::string_view str) {
          |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                semverIsDotSeperatedBuildIdentifiers
  • src/SemVer.cpp:103:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      103 | constexpr bool _semverIsDotSeperatedBuildIdentifiers(std::string_view str) {
          |           ~~~~ ^
          |           auto                                                             -> bool
  • src/SemVer.cpp:121:16: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_semverIsDotSeperatedPreleaseIdentifiers', which is reserved in the global namespace

      121 | constexpr bool _semverIsDotSeperatedPreleaseIdentifiers(std::string_view str) {
          |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                semverIsDotSeperatedPreleaseIdentifiers
  • src/SemVer.cpp:121:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      121 | constexpr bool _semverIsDotSeperatedPreleaseIdentifiers(std::string_view str) {
          |           ~~~~ ^
          |           auto                                                                -> bool
  • src/SemVer.cpp:140:12: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_semverIsMinor', which is reserved in the global namespace

      140 | const auto _semverIsMinor = _semverIsNumericIdentifier;
          |            ^~~~~~~~~~~~~~
          |            semverIsMinor
  • src/SemVer.cpp:141:12: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_semverIsMajor', which is reserved in the global namespace

      141 | const auto _semverIsMajor = _semverIsNumericIdentifier;
          |            ^~~~~~~~~~~~~~
          |            semverIsMajor
  • src/SemVer.cpp:142:12: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_semverIsPrerelease', which is reserved in the global namespace

      142 | const auto _semverIsPrerelease = _semverIsDotSeperatedPreleaseIdentifiers;
          |            ^~~~~~~~~~~~~~~~~~~
          |            semverIsPrerelease
  • src/SemVer.cpp:143:12: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_semverIsBuild', which is reserved in the global namespace

      143 | const auto _semverIsBuild      = _semverIsDotSeperatedBuildIdentifiers;
          |            ^~~~~~~~~~~~~~
          |            semverIsBuild
  • src/SemVer.cpp:144:6: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_semverIsVersionCore', which is reserved in the global namespace

      144 | bool _semverIsVersionCore(std::string_view str) {
          |      ^~~~~~~~~~~~~~~~~~~~
          |      semverIsVersionCore
  • src/SemVer.cpp:144:6: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      144 | bool _semverIsVersionCore(std::string_view str) {
          | ~~~~ ^
          | auto                                            -> bool
    /home/runner/work/Firmware/Firmware/src/SemVer.cpp:149:25: warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays]
      149 |   std::string_view parts[3];
          |                         ^
  • src/SemVer.cpp:156:6: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_semverIsSemver', which is reserved in the global namespace

      156 | bool _semverIsSemver(std::string_view str) {
          |      ^~~~~~~~~~~~~~~
          |      semverIsSemver
  • src/SemVer.cpp:156:6: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      156 | bool _semverIsSemver(std::string_view str) {
          | ~~~~ ^
          | auto                                       -> bool
  • src/SemVer.cpp:197:6: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_tryParseU16', which is reserved in the global namespace

      197 | bool _tryParseU16(std::string_view str, uint16_t& out) {
          |      ^~~~~~~~~~~~
          |      tryParseU16
  • src/SemVer.cpp:197:6: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      197 | bool _tryParseU16(std::string_view str, uint16_t& out) {
          | ~~~~ ^
          | auto                                                   -> bool
  • src/config/BackendConfig.cpp:1:10: error: [clang-diagnostic-error]

    'config/BackendConfig.h' file not found

        1 | #include "config/BackendConfig.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~
  • src/config/Config.cpp:1:10: error: [clang-diagnostic-error]

    'freertos/FreeRTOS.h' file not found

        1 | #include <freertos/FreeRTOS.h>
          |          ^~~~~~~~~~~~~~~~~~~~~
  • src/config/WiFiConfig.cpp:1:10: error: [clang-diagnostic-error]

    'config/WiFiConfig.h' file not found

        1 | #include "config/WiFiConfig.h"
          |          ^~~~~~~~~~~~~~~~~~~~~
  • src/config/WiFiCredentials.cpp:1:10: error: [clang-diagnostic-error]

    'config/WiFiCredentials.h' file not found

        1 | #include "config/WiFiCredentials.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  • src/config/internal/utils.cpp:1:10: error: [clang-diagnostic-error]

    'config/internal/utils.h' file not found

        1 | #include "config/internal/utils.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~
  • src/event_handlers/websocket/gateway/OtaInstall.cpp:1:10: error: [clang-diagnostic-error]

    'event_handlers/impl/WSGateway.h' file not found

        1 | #include "event_handlers/impl/WSGateway.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • src/http/HTTPRequestManager.cpp:1:10: error: [clang-diagnostic-error]

    'http/HTTPRequestManager.h' file not found

        1 | #include "http/HTTPRequestManager.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  • src/http/HTTPRequestManager.cpp:109:18: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_getDomain', which is reserved in the global namespace

      109 | std::string_view _getDomain(std::string_view url) {
          |                  ^~~~~~~~~~
          |                  getDomain
  • src/http/HTTPRequestManager.cpp:109:18: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

  • src/http/HTTPRequestManager.cpp:145:28: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_rateLimitFactory', which is reserved in the global namespace

      145 | std::shared_ptr<RateLimit> _rateLimitFactory(std::string_view domain) {
          |                            ^~~~~~~~~~~~~~~~~
          |                            rateLimitFactory
  • src/http/HTTPRequestManager.cpp:145:28: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      145 | std::shared_ptr<RateLimit> _rateLimitFactory(std::string_view domain) {
          | ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
          | auto                                                                  -> std::shared_ptr<RateLimit>
    /home/runner/work/Firmware/Firmware/src/http/HTTPRequestManager.cpp:149:23: warning: 1000 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
      149 |   rateLimit->addLimit(1000, 5);        // 5 per second
          |                       ^
    /home/runner/work/Firmware/Firmware/src/http/HTTPRequestManager.cpp:149:29: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
      149 |   rateLimit->addLimit(1000, 5);        // 5 per second
          |                             ^
  • src/http/HTTPRequestManager.cpp:161:28: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_getRateLimiter', which is reserved in the global namespace

      161 | std::shared_ptr<RateLimit> _getRateLimiter(std::string_view url) {
          |                            ^~~~~~~~~~~~~~~
          |                            getRateLimiter
  • src/http/HTTPRequestManager.cpp:161:28: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      161 | std::shared_ptr<RateLimit> _getRateLimiter(std::string_view url) {
          | ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
          | auto                                                             -> std::shared_ptr<RateLimit>
  • src/http/HTTPRequestManager.cpp:180:6: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_setupClient', which is reserved in the global namespace

      180 | void _setupClient(HTTPClient& client) {
          |      ^~~~~~~~~~~~
          |      setupClient
  • src/http/HTTPRequestManager.cpp:184:8: warning: [cppcoreguidelines-pro-type-member-init]

    constructor does not initialize these fields: result, nWritten

      184 | struct StreamReaderResult {
          |        ^
      185 |   HTTP::RequestResult result;
          |                             
          |                             {}
      186 |   std::size_t nWritten;
          |                       
          |                       {}
  • src/http/HTTPRequestManager.cpp:207:16: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_tryParseHexSizeT', which is reserved in the global namespace

      207 | constexpr bool _tryParseHexSizeT(std::size_t& result, std::string_view str) {
          |                ^~~~~~~~~~~~~~~~~
          |                tryParseHexSizeT
  • src/http/HTTPRequestManager.cpp:207:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      207 | constexpr bool _tryParseHexSizeT(std::size_t& result, std::string_view str) {
          |           ~~~~ ^
          |           auto                                                              -> bool
  • src/http/HTTPRequestManager.cpp:442:29: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_doGetStream', which is reserved in the global namespace

      442 | HTTP::Response<std::size_t> _doGetStream(
          |                             ^~~~~~~~~~~~
          |                             doGetStream
  • src/http/HTTPRequestManager.cpp:442:29: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

  • src/http/HTTPRequestManager.cpp:444:3: warning: [bugprone-easily-swappable-parameters]

    3 adjacent parameters of '_doGetStream' of similar type are easily swapped by mistake

      444 |   std::string_view url,
          |   ^~~~~~~~~~~~~~~~~~~~~
      445 |   const std::map<String, String>& headers,
          |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      446 |   const std::vector<int>& acceptedCodes,
          |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/Firmware/Firmware/src/http/HTTPRequestManager.cpp:444:20: note: the first parameter in the range is 'url'
      444 |   std::string_view url,
          |                    ^~~
    /home/runner/work/Firmware/Firmware/src/http/HTTPRequestManager.cpp:446:27: note: the last parameter in the range is 'acceptedCodes'
      446 |   const std::vector<int>& acceptedCodes,
          |                           ^~~~~~~~~~~~~
    /home/runner/work/Firmware/Firmware/src/http/HTTPRequestManager.cpp:445:3: note: 'int' and 'const int &' parameters accept and bind the same kind of values
      445 |   const std::map<String, String>& headers,
          |   ^
  • src/http/HTTPRequestManager.cpp:448:3: warning: [bugprone-easily-swappable-parameters]

    3 adjacent parameters of '_doGetStream' of convertible types are easily swapped by mistake

      448 |   HTTP::GotContentLengthCallback contentLengthCallback,
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      449 |   HTTP::DownloadCallback downloadCallback,
          |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      450 |   uint32_t timeoutMs
          |   ~~~~~~~~~~~~~~~~~~
    /home/runner/work/Firmware/Firmware/src/http/HTTPRequestManager.cpp:448:34: note: the first parameter in the range is 'contentLengthCallback'
      448 |   HTTP::GotContentLengthCallback contentLengthCallback,
          |                                  ^~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/Firmware/Firmware/src/http/HTTPRequestManager.cpp:450:12: note: the last parameter in the range is 'timeoutMs'
      450 |   uint32_t timeoutMs
          |            ^~~~~~~~~
    /home/runner/work/Firmware/Firmware/src/http/HTTPRequestManager.cpp:448:3: note: 
      448 |   HTTP::GotContentLengthCallback contentLengthCallback,
          |   ^
    /home/runner/work/Firmware/Firmware/src/http/HTTPRequestManager.cpp:450:3: note: 'int' and 'uint32_t' may be implicitly converted: 'int' -> 'uint32_t' (as 'unsigned int'), 'uint32_t' (as 'unsigned int') -> 'int'
      450 |   uint32_t timeoutMs
          |   ^
  • src/http/HTTPRequestManager.cpp:452:11: warning: [cppcoreguidelines-init-variables]

    variable 'begin' is not initialized

      452 |   int64_t begin = OpenShock::millis();
          |           ^
          |                 = 0
  • src/http/JsonAPI.cpp:1:10: error: [clang-diagnostic-error]

    'http/JsonAPI.h' file not found

        1 | #include "http/JsonAPI.h"
          |          ^~~~~~~~~~~~~~~~
  • src/intconv.cpp:1:10: error: [clang-diagnostic-error]

    'intconv.h' file not found

        1 | #include "intconv.h"
          |          ^~~~~~~~~~~
  • src/intconv.cpp:11:24: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       11 | constexpr unsigned int NumDigits() {
          |           ~~~~~~~~~~~~ ^
          |           auto                     -> unsigned int
  • src/intconv.cpp:12:17: warning: [modernize-type-traits]

    use c++17 style variable templates

       12 |   static_assert(std::is_integral<T>::value);
          |                 ^                  ~~~~~~~
          |                                 _v
  • src/intconv.cpp:26:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       26 | constexpr bool spanToT(std::string_view str, T& val) {
          |           ~~~~ ^
          |           auto                                       -> bool
  • src/intconv.cpp:27:17: warning: [modernize-type-traits]

    use c++17 style variable templates

       27 |   static_assert(std::is_integral<T>::value);
          |                 ^                  ~~~~~~~
          |                                 _v
  • src/intconv.cpp:61:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       61 | constexpr bool spanToUT(std::string_view str, T& val) {
          |           ~~~~ ^
          |           auto                                        -> bool
  • src/intconv.cpp:62:17: warning: [modernize-type-traits]

    use c++17 style variable templates

       62 |   static_assert(std::is_unsigned<T>::value);
          |                 ^                  ~~~~~~~
          |                                 _v
  • src/intconv.cpp:73:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       73 | constexpr bool spanToST(std::string_view str, T& val) {
          |           ~~~~ ^
          |           auto                                        -> bool
  • src/intconv.cpp:74:17: warning: [modernize-type-traits]

    use c++17 style variable templates

       74 |   static_assert(std::is_signed<T>::value);
          |                 ^                ~~~~~~~
          |                               _v
  • src/intconv.cpp:140:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      140 | constexpr bool test_spanToUT8() {
          |           ~~~~ ^
          |           auto                  -> bool
  • src/intconv.cpp:141:11: warning: [readability-identifier-length]

    variable name 'u8' is too short, expected at least 3 characters

      141 |   uint8_t u8 = 0;
          |           ^
  • src/intconv.cpp:147:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      147 | constexpr bool test_spanToUT16() {
          |           ~~~~ ^
          |           auto                   -> bool
  • src/intconv.cpp:154:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      154 | constexpr bool test_spanToUT32() {
          |           ~~~~ ^
          |           auto                   -> bool
  • src/intconv.cpp:161:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      161 | constexpr bool test_spanToUT64() {
          |           ~~~~ ^
          |           auto                   -> bool
  • src/intconv.cpp:168:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      168 | constexpr bool test_spanToUT8Overflow() {
          |           ~~~~ ^
          |           auto                          -> bool
  • src/intconv.cpp:169:11: warning: [readability-identifier-length]

    variable name 'u8' is too short, expected at least 3 characters

      169 |   uint8_t u8 = 0;
          |           ^
  • src/intconv.cpp:175:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      175 | constexpr bool test_spanToUT16Overflow() {
          |           ~~~~ ^
          |           auto                           -> bool
  • src/intconv.cpp:182:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      182 | constexpr bool test_spanToUT32Overflow() {
          |           ~~~~ ^
          |           auto                           -> bool
  • src/intconv.cpp:189:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      189 | constexpr bool test_spanToUT64Overflow() {
          |           ~~~~ ^
          |           auto                           -> bool
  • src/intconv.cpp:196:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      196 | constexpr bool test_spanToST8() {
          |           ~~~~ ^
          |           auto                  -> bool
  • src/intconv.cpp:197:10: warning: [readability-identifier-length]

    variable name 'i8' is too short, expected at least 3 characters

      197 |   int8_t i8 = 0;
          |          ^
  • src/intconv.cpp:203:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      203 | constexpr bool test_spanToST16() {
          |           ~~~~ ^
          |           auto                   -> bool
  • src/intconv.cpp:210:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      210 | constexpr bool test_spanToST32() {
          |           ~~~~ ^
          |           auto                   -> bool
  • src/intconv.cpp:217:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      217 | constexpr bool test_spanToST64() {
          |           ~~~~ ^
          |           auto                   -> bool
  • src/intconv.cpp:224:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      224 | constexpr bool test_spanToST8Underflow() {
          |           ~~~~ ^
          |           auto                           -> bool
  • src/intconv.cpp:225:10: warning: [readability-identifier-length]

    variable name 'i8' is too short, expected at least 3 characters

      225 |   int8_t i8 = 0;
          |          ^
  • src/intconv.cpp:231:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      231 | constexpr bool test_spanToST8Overflow() {
          |           ~~~~ ^
          |           auto                          -> bool
  • src/intconv.cpp:232:10: warning: [readability-identifier-length]

    variable name 'i8' is too short, expected at least 3 characters

      232 |   int8_t i8 = 0;
          |          ^
  • src/intconv.cpp:238:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      238 | constexpr bool test_spanToST16Underflow() {
          |           ~~~~ ^
          |           auto                            -> bool
  • src/intconv.cpp:245:16: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      245 | constexpr bool test_spanToST16Overflow() {
          |           ~~~~ ^
          |           auto                           -> bool

Have any feedback or feature suggestions? Share it here.

@hhvrc hhvrc merged commit 2868374 into develop Sep 6, 2024
34 of 35 checks passed
@hhvrc hhvrc deleted the feature/replace-stringview-with-std branch September 6, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant