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

please clang-tidy

parent 3b52e45e
Branches
Tags
2 merge requests!42Release 0.2.0,!39F remove boost rdep
Pipeline #24578 passed with warnings
Pipeline: caosdb-cppinttest

#24579

    ......@@ -323,7 +323,7 @@ if(_LINTING)
    else()
    message(STATUS "clang-tidy: ${clang_tidy}")
    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_CXX_CLANG_TIDY "${clang_tidy}"
    "--header-filter=caosdb/.*[^\(\.pb\.h\)]$"
    ......
    ......@@ -137,14 +137,14 @@ public:
    *
    * Also moves the `wrapped` object.
    */
    JsonValue(JsonValue &&other);
    JsonValue(JsonValue &&other) noexcept ;
    /**
    * Move Assigment.
    *
    * 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.
    ......
    ......@@ -479,7 +479,8 @@ auto ConfigurationManager::InitializeDefaults() -> int { // NOLINT
    "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)
    << ".";
    }
    ......
    ......@@ -147,7 +147,7 @@ auto load_json_file(const path &json_file) -> JsonValue {
    JsonValue::~JsonValue() { this->Reset(); }
    auto JsonValue::Reset() -> void {
    void *tmp = std::move(this->wrapped);
    void *tmp = this->wrapped;
    this->wrapped = nullptr;
    if (tmp != nullptr) {
    delete static_cast<value *>(tmp);
    ......@@ -170,16 +170,14 @@ auto JsonValue::operator=(const JsonValue &other) -> JsonValue & {
    return *this;
    }
    JsonValue::JsonValue(JsonValue &&other) : wrapped(nullptr) {
    std::cout << "MoveConstructor" << std::endl;
    JsonValue::JsonValue(JsonValue &&other) noexcept : wrapped(nullptr) {
    if (!other.IsNull()) {
    this->wrapped = other.wrapped;
    other.wrapped = nullptr;
    }
    }
    auto JsonValue::operator=(JsonValue &&other) -> JsonValue & {
    std::cout << "MoveAssignment" << std::endl;
    auto JsonValue::operator=(JsonValue &&other) noexcept -> JsonValue & {
    if (this != &other) {
    this->wrapped = other.wrapped;
    other.wrapped = nullptr;
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment