-
Notifications
You must be signed in to change notification settings - Fork 21
Add CMake clang-tidy integration, enable in CI, and fix all clang-tidy errors #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
39e2879
311dc01
21700ea
9d5bfd8
1db0d6e
129d9b4
02e2456
5d66dbd
1b390c1
35229d4
b80121b
34dbb5a
c71272d
e65fe00
0bd71c5
fed2e1d
7f9ec1d
e10837a
a02c9f4
9b34a8c
b4725ec
eda7fe6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| --- | ||
| Checks: > | ||
| -*, | ||
| bugprone-*, | ||
| -bugprone-easily-swappable-parameters, | ||
| -bugprone-unhandled-self-assignment, | ||
| cert-*, | ||
| -cert-err33-c, | ||
| -cert-err34-c, | ||
| -cert-msc30-c, | ||
| -cert-msc32-c, | ||
| -cert-msc50-cpp, | ||
| -cert-msc51-cpp, | ||
| -cert-oop54-cpp, | ||
| clang-analyzer-*, | ||
| concurrency-*, | ||
| -concurrency-mt-unsafe, | ||
| cppcoreguidelines-*, | ||
| -cppcoreguidelines-avoid-c-arrays, | ||
| -cppcoreguidelines-avoid-magic-numbers, | ||
| -cppcoreguidelines-c-copy-assignment-signature, | ||
| -cppcoreguidelines-non-private-member-variables-in-classes, | ||
| -cppcoreguidelines-owning-memory, | ||
| -cppcoreguidelines-pro-bounds-array-to-pointer-decay, | ||
| -cppcoreguidelines-pro-bounds-constant-array-index, | ||
| -cppcoreguidelines-pro-bounds-pointer-arithmetic, | ||
| -cppcoreguidelines-pro-type-member-init, | ||
| -cppcoreguidelines-pro-type-reinterpret-cast, | ||
| -cppcoreguidelines-pro-type-vararg, | ||
| -cppcoreguidelines-special-member-functions, | ||
| hicpp-*, | ||
| -hicpp-avoid-c-arrays, | ||
| -hicpp-explicit-conversions, | ||
| -hicpp-member-init, | ||
| -hicpp-no-array-decay, | ||
| -hicpp-signed-bitwise, | ||
| -hicpp-special-member-functions, | ||
| -hicpp-vararg, | ||
| misc-*, | ||
| -misc-confusable-identifiers, | ||
| -misc-include-cleaner, | ||
| -misc-non-private-member-variables-in-classes, | ||
| -misc-unconventional-assign-operator, | ||
| modernize-*, | ||
| -modernize-avoid-c-arrays, | ||
| -modernize-use-trailing-return-type, | ||
| performance-*, | ||
| portability-*, | ||
| readability-*, | ||
| -readability-function-cognitive-complexity, | ||
| -readability-identifier-length, | ||
| -readability-magic-numbers | ||
| WarningsAsErrors: '*' | ||
| FormatStyle: file |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,17 @@ option(TESTS "enable testing" OFF) | |
| option(EVERCRYPT "enable comparison with EverCrypt Merkle trees" OFF) | ||
| option(OPENSSL "enable OpenSSL" OFF) | ||
| option(TRACE "enable debug traces" OFF) | ||
| option(CLANG_TIDY "enable clang-tidy checks during build" OFF) | ||
|
|
||
| if(CLANG_TIDY) | ||
| find_program(CLANG_TIDY_PROGRAM clang-tidy) | ||
| if(CLANG_TIDY_PROGRAM) | ||
| set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_PROGRAM}) | ||
| set(CMAKE_C_CLANG_TIDY ${CLANG_TIDY_PROGRAM}) | ||
|
Comment on lines
+18
to
+22
|
||
| else() | ||
| message(FATAL_ERROR "clang-tidy not found") | ||
| endif() | ||
| endif() | ||
|
|
||
| add_library(merklecpp INTERFACE) | ||
| target_include_directories(merklecpp INTERFACE .) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.