Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020-2024 Alfredo A. Correa
# Copyright 2020-2025 Alfredo A. Correa

WarningsAsErrors: '*'
HeaderFilterRegex: '.'
Expand All @@ -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