Add `TIDY` clang-tidy script to tools.

This commit is contained in:
Stephen Anthony 2024-08-05 16:12:27 -02:30
parent 352c449940
commit db92bc89fd
1 changed files with 89 additions and 0 deletions

89
src/tools/TIDY Executable file
View File

@ -0,0 +1,89 @@
#!/usr/bin/env bash
run-clang-tidy-18 -header-filter=\(.*\.hxx\) \
-checks=*,\
-abseil*,\
-altera*,\
-android*,\
-fuchsia*,\
-llvmlibc-inline-function-decl,\
-bugprone-assignment-in-if-condition,\
-bugprone-branch-clone,\
-bugprone-easily-swappable-parameters,\
-bugprone-narrowing-conversions,\
-bugprone-reserved-identifier,\
-cert-dcl37-c,\
-cert-dcl51-cpp,\
-cert-err58-cpp,\
-clang-analyzer-core.DivideZero,\
-clang-analyzer-cplusplus.NewDeleteLeaks,\
-clang-analyzer-optin.performance.Padding,\
-clang-diagnostic-unsafe-buffer-usage,\
-cppcoreguidelines-avoid-c-arrays,\
-cppcoreguidelines-avoid-do-while,\
-cppcoreguidelines-avoid-magic-numbers,\
-cppcoreguidelines-avoid-non-const-global-variables,\
-cppcoreguidelines-macro-usage,\
-cppcoreguidelines-misleading-capture-default-by-value,\
-cppcoreguidelines-narrowing-conversions,\
-cppcoreguidelines-non-private-member-variables-in-classes,\
-cppcoreguidelines-owning-memory,\
-cppcoreguidelines-prefer-member-initializer,\
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,\
-cppcoreguidelines-pro-bounds-constant-array-index,\
-cppcoreguidelines-pro-bounds-pointer-arithmetic,\
-cppcoreguidelines-pro-type-const-cast,\
-cppcoreguidelines-pro-type-member-init,\
-cppcoreguidelines-pro-type-reinterpret-cast,\
-cppcoreguidelines-pro-type-static-cast-downcast,\
-cppcoreguidelines-pro-type-vararg,\
-google-build-using-namespace,\
-google-default-arguments,\
-google-global-names-in-headers,\
-google-readability-braces-around-statements,\
-google-readability-todo,\
-hicpp-avoid-c-arrays,\
-hicpp-braces-around-statements,\
-hicpp-explicit-conversions,\
-hicpp-member-init,\
-hicpp-named-parameter,\
-hicpp-no-array-decay,\
-hicpp-signed-bitwise,\
-hicpp-special-member-functions,\
-hicpp-use-equals-default,\
-hicpp-use-equals-delete,\
-hicpp-vararg,\
-llvm-else-after-return,\
-llvm-header-guard,\
-llvm-include-order,\
-llvmlibc-callee-namespace,\
-llvmlibc-implementation-in-namespace,\
-llvmlibc-restrict-system-libc-headers,\
-misc-confusable-identifiers,\
-misc-include-cleaner,\
-misc-no-recursion,\
-misc-non-private-member-variables-in-classes,\
-misc-unused-parameters,\
-modernize-avoid-bind,\
-modernize-avoid-c-arrays,\
-modernize-pass-by-value,\
-modernize-use-equals-delete,\
-modernize-use-nodiscard,\
-modernize-use-trailing-return-type,\
-readability-avoid-nested-conditional-operator,\
-readability-avoid-unconditional-preprocessor-if,\
-readability-braces-around-statements,\
-readability-else-after-return,\
-readability-function-cognitive-complexity,\
-readability-identifier-length,\
-readability-implicit-bool-conversion,\
-readability-isolate-declaration,\
-readability-magic-numbers,\
-readability-named-parameter,\
-readability-redundant-access-specifiers,\
-readability-simplify-boolean-expr,\
-readability-suspicious-call-argument,\
-readability-use-anyofallof\
> ~/tmp/TODO
exit