diff --git a/cmake/common/clang-tidy.json b/cmake/common/clang-tidy.json index c9e314e3b..55f6211c4 100644 --- a/cmake/common/clang-tidy.json +++ b/cmake/common/clang-tidy.json @@ -1,6 +1,22 @@ { - "Checks": "-*, bugprone-*, -bugprone-easily-swappable-parameters,-bugprone-unchecked-optional-access, concurrency-*,cppcoreguidelines-missing-std-forward, - cppcoreguidelines-avoid-const-or-ref-data-members, modernize-*, performance-*, portability-*", + "Checks": "-*, + bugprone-*, + -bugprone-easily-swappable-parameters, + -bugprone-unchecked-optional-access, + concurrency-*, + cppcoreguidelines-*, + -cppcoreguidelines-avoid-magic-numbers, + -cppcoreguidelines-special-member-functions, + -cppcoreguidelines-pro-type-reinterpret-cast, + -cppcoreguidelines-pro-bounds-pointer-arithmetic, + -cppcoreguidelines-rvalue-reference-param-not-moved, + -cppcoreguidelines-pro-type-union-access, + -cppcoreguidelines-macro-usage, + -cppcoreguidelines-pro-type-member-init, + -cppcoreguidelines-avoid-goto, + modernize-*, + performance-*, + portability-*", "WarningsAsErrors": "*", "FormatStyle": "none", "UseColor": true diff --git a/src/core/gzip/gzip.cc b/src/core/gzip/gzip.cc index 267757f42..77e702480 100644 --- a/src/core/gzip/gzip.cc +++ b/src/core/gzip/gzip.cc @@ -19,8 +19,8 @@ auto gzip(std::istream &input, std::ostream &output) -> void { throw GZIPError{"Could not compress input"}; } - std::array buffer_input; - std::array buffer_output; + std::array buffer_input{}; + std::array buffer_output{}; bool reached_end_of_input{false}; auto code{Z_OK}; @@ -68,8 +68,8 @@ auto gunzip(std::istream &input, std::ostream &output) -> void { throw GZIPError("Could not decompress input"); } - std::array buffer_input; - std::array buffer_output; + std::array buffer_input{}; + std::array buffer_output{}; auto code{Z_OK}; while (code != Z_STREAM_END) { diff --git a/src/core/md5/md5.cc b/src/core/md5/md5.cc index 3178fe28d..ec6f9ea91 100644 --- a/src/core/md5/md5.cc +++ b/src/core/md5/md5.cc @@ -30,7 +30,7 @@ auto md5(std::string_view input, std::ostream &output) -> void { br_md5_context context; br_md5_init(&context); br_md5_update(&context, input.data(), input.size()); - std::array hash; + std::array hash{}; br_md5_out(&context, hash.data()); std::string_view buffer{reinterpret_cast(hash.data()), br_md5_SIZE}; diff --git a/src/core/time/gmt.cc b/src/core/time/gmt.cc index dd50e2f58..b64ecaf5d 100644 --- a/src/core/time/gmt.cc +++ b/src/core/time/gmt.cc @@ -18,7 +18,7 @@ namespace sourcemeta::core { auto to_gmt(const std::chrono::system_clock::time_point time) -> std::string { const std::time_t ctime = std::chrono::system_clock::to_time_t(time); - std::tm buffer; + std::tm buffer{}; #if defined(_MSC_VER) if (gmtime_s(&buffer, &ctime) != 0) { throw std::runtime_error("Could not convert time point to GMT");