Skip to content
Snippets Groups Projects
Verified Commit ba450ecd authored by Timm Fitschen's avatar Timm Fitschen
Browse files

please clang-tidy

parent 3b52e45e
No related branches found
No related tags found
2 merge requests!42Release 0.2.0,!39F remove boost rdep
Pipeline #24578 passed with warnings
Pipeline: caosdb-cppinttest

#24579

    This commit is part of merge request !39. Comments created here will be created in the context of that merge request.
    ...@@ -323,7 +323,7 @@ if(_LINTING) ...@@ -323,7 +323,7 @@ if(_LINTING)
    else() else()
    message(STATUS "clang-tidy: ${clang_tidy}") message(STATUS "clang-tidy: ${clang_tidy}")
    set(_CMAKE_CXX_CLANG_TIDY_CHECKS set(_CMAKE_CXX_CLANG_TIDY_CHECKS
    "--checks=*,-fuchsia-*,-llvmlibc-*,-readability-convert-member-functions-to-static,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-hicpp-no-array-decay,-llvm-else-after-return,-readability-else-after-return,-modernize-use-trailing-return-type,-bugprone-branch-clone,-altera-*,-cppcoreguidelines-macro-usage,-*-avoid-c-arrays") "--checks=*,-fuchsia-*,-llvmlibc-*,-readability-convert-member-functions-to-static,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-hicpp-no-array-decay,-llvm-else-after-return,-readability-else-after-return,-modernize-use-trailing-return-type,-bugprone-branch-clone,-altera-*,-cppcoreguidelines-macro-usage,-*-avoid-c-arrays,-cppcoreguidelines-owning-memory")
    set(_CMAKE_C_CLANG_TIDY_CHECKS "${_CMAKE_CXX_CLANG_TIDY_CHECKS}") set(_CMAKE_C_CLANG_TIDY_CHECKS "${_CMAKE_CXX_CLANG_TIDY_CHECKS}")
    set(_CMAKE_CXX_CLANG_TIDY "${clang_tidy}" set(_CMAKE_CXX_CLANG_TIDY "${clang_tidy}"
    "--header-filter=caosdb/.*[^\(\.pb\.h\)]$" "--header-filter=caosdb/.*[^\(\.pb\.h\)]$"
    ......
    ...@@ -137,14 +137,14 @@ public: ...@@ -137,14 +137,14 @@ public:
    * *
    * Also moves the `wrapped` object. * Also moves the `wrapped` object.
    */ */
    JsonValue(JsonValue &&other); JsonValue(JsonValue &&other) noexcept ;
    /** /**
    * Move Assigment. * Move Assigment.
    * *
    * Also moves the `wrapped` object. * Also moves the `wrapped` object.
    */ */
    auto operator=(JsonValue &&other) -> JsonValue &; auto operator=(JsonValue &&other) noexcept -> JsonValue &;
    /** /**
    * Return true if the `wrapped` object is the nullptr. * Return true if the `wrapped` object is the nullptr.
    ......
    ...@@ -479,7 +479,8 @@ auto ConfigurationManager::InitializeDefaults() -> int { // NOLINT ...@@ -479,7 +479,8 @@ auto ConfigurationManager::InitializeDefaults() -> int { // NOLINT
    "We are using the default configuration"; "We are using the default configuration";
    } }
    if (configuration_file_path != nullptr && !this->json_configuration.IsNull() && WRAPPED_JSON_CONFIGURATION(this)->is_object()) { if (configuration_file_path != nullptr && !this->json_configuration.IsNull() &&
    WRAPPED_JSON_CONFIGURATION(this)->is_object()) {
    CAOSDB_LOG_INFO(logger_name) << "Loaded configuration from " << *(configuration_file_path) CAOSDB_LOG_INFO(logger_name) << "Loaded configuration from " << *(configuration_file_path)
    << "."; << ".";
    } }
    ......
    ...@@ -147,7 +147,7 @@ auto load_json_file(const path &json_file) -> JsonValue { ...@@ -147,7 +147,7 @@ auto load_json_file(const path &json_file) -> JsonValue {
    JsonValue::~JsonValue() { this->Reset(); } JsonValue::~JsonValue() { this->Reset(); }
    auto JsonValue::Reset() -> void { auto JsonValue::Reset() -> void {
    void *tmp = std::move(this->wrapped); void *tmp = this->wrapped;
    this->wrapped = nullptr; this->wrapped = nullptr;
    if (tmp != nullptr) { if (tmp != nullptr) {
    delete static_cast<value *>(tmp); delete static_cast<value *>(tmp);
    ...@@ -170,16 +170,14 @@ auto JsonValue::operator=(const JsonValue &other) -> JsonValue & { ...@@ -170,16 +170,14 @@ auto JsonValue::operator=(const JsonValue &other) -> JsonValue & {
    return *this; return *this;
    } }
    JsonValue::JsonValue(JsonValue &&other) : wrapped(nullptr) { JsonValue::JsonValue(JsonValue &&other) noexcept : wrapped(nullptr) {
    std::cout << "MoveConstructor" << std::endl;
    if (!other.IsNull()) { if (!other.IsNull()) {
    this->wrapped = other.wrapped; this->wrapped = other.wrapped;
    other.wrapped = nullptr; other.wrapped = nullptr;
    } }
    } }
    auto JsonValue::operator=(JsonValue &&other) -> JsonValue & { auto JsonValue::operator=(JsonValue &&other) noexcept -> JsonValue & {
    std::cout << "MoveAssignment" << std::endl;
    if (this != &other) { if (this != &other) {
    this->wrapped = other.wrapped; this->wrapped = other.wrapped;
    other.wrapped = nullptr; other.wrapped = nullptr;
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment