diff --git a/.clang-tidy b/.clang-tidy index b51d4734e..b1d1f1ef0 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,4 +1,4 @@ -# Copyright 2020-2024 Alfredo A. Correa +# Copyright 2020-2025 Alfredo A. Correa WarningsAsErrors: '*' HeaderFilterRegex: '.' @@ -22,38 +22,33 @@ CheckOptions: - { key: readability-identifier-naming.TemplateParameterCase , value: CamelCase } - { key: readability-identifier-naming.TypeTemplateParameterIgnoredRegexp, value: expr-type} - { key: readability-operators-representation.BinaryOperators , value: '&&;&=;&;|;~;!;!=;||;|=;^;^='} -# value: expr-type , bug in clang 16 in c++20 mode https://stackoverflow.com/a/75157215/225186 - -# for range-for loops, e.g. `for(auto i : is) ...` -# - { key: readability-identifier-length.IgnoredVariableNames , value: "^[ijk]$" } Checks: '*, -altera-struct-pack-align, -boost-use-ranges, -cppcoreguidelines-avoid-magic-numbers, -cppcoreguidelines-macro-usage, - -cppcoreguidelines-pro-bounds-array-to-pointer-decay, - -fuchsia-overloaded-operator, -fuchsia-default-arguments-calls, + -fuchsia-overloaded-operator, -fuchsia-trailing-return, - -hicpp-no-array-decay, -llvmlibc-*, -modernize-use-nodiscard, - -readability-magic-numbers, - -readability-simplify-boolean-expr' + -readability-magic-numbers' + +# -cppcoreguidelines-pro-bounds-array-to-pointer-decay, +# -hicpp-no-array-decay, // for Boost Lightweight Test +# -llvm-header-guard, // allow PCH +# -misc-include-cleaner // allow PCH +# readability-simplify-boolean-expr, // for Boost Lightweight Test BOOST_TEST + ## explanation of the suppressed rules above: # -altera-struct-pack-align, // this asks to use non-standard pragmas such as __attribute__((aligned(0))) and _attribute__((packed)), may interfeere with gcc/nvcc compatibility? # -boost-use-ranges // would introduce a dependency on Boost -# -clang-diagnostic-deprecated-declarations // some test run deprecated functions on purpose # -cppcoreguidelines-avoid-magic-numbers, // all tests use magic numbers -# -cppcoreguidelines-pro-bounds-array-to-pointer-decay // for Boost Lightweight test BOOST_TEST # -cppcoreguidelines-macro-usage, // BLAS adaptors uses a lot of macros # -fuchsia-default-arguments-calls, // this library uses STL functions, which use default arguments # -fuchsia-overloaded-operator, // this library overloads operators (==, <, +, &) -# -hicpp-no-array-decay, // for Boost Lightweight Test +#. -fuchsia-trailing-return, // asks all functions to be pure 'auto' # -llvmlibc-*, // nonsense warnings, for llvm developers -# -llvm-header-guard, // allow PCH -# -misc-include-cleaner // allow PCH # -modernize-use-nodiscard, // this would add [[nodiscard]] to almost all functions, adding a lot of noise # -readability-magic-numbers, // many tests use magic numbers -# readability-simplify-boolean-expr, // for Boost Lightweight Test BOOST_TEST