From 12fde696c1488e71f7315bb95e1498eaf13ea027 Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 2 Mar 2025 05:27:53 -0500 Subject: [PATCH] Trunk: Add clang-tidy (#6171) --- .trunk/configs/.clang-tidy | 39 ++++++++++++++++++++++++++++++++++++++ .trunk/trunk.yaml | 1 + 2 files changed, 40 insertions(+) create mode 100644 .trunk/configs/.clang-tidy diff --git a/.trunk/configs/.clang-tidy b/.trunk/configs/.clang-tidy new file mode 100644 index 000000000..e4bd819fa --- /dev/null +++ b/.trunk/configs/.clang-tidy @@ -0,0 +1,39 @@ +Checks: >- + bugprone-*, + cppcoreguidelines-*, + google-*, + misc-*, + modernize-*, + performance-*, + readability-*, + -bugprone-lambda-function-name, + -bugprone-reserved-identifier, + -cppcoreguidelines-avoid-goto, + -cppcoreguidelines-avoid-magic-numbers, + -cppcoreguidelines-avoid-non-const-global-variables, + -cppcoreguidelines-pro-bounds-array-to-pointer-decay, + -cppcoreguidelines-pro-type-vararg, + -google-readability-braces-around-statements, + -google-readability-function-size, + -misc-no-recursion, + -modernize-return-braced-init-list, + -modernize-use-nodiscard, + -modernize-use-trailing-return-type, + -performance-unnecessary-value-param, + -readability-magic-numbers, + +CheckOptions: + - key: readability-function-cognitive-complexity.Threshold + value: 100 + - key: readability-function-cognitive-complexity.IgnoreMacros + value: true + # Set naming conventions for your style below (there are dozens of naming settings possible): + # See https://clang.llvm.org/extra/clang-tidy/checks/readability/identifier-naming.html + # - key: readability-identifier-naming.ClassCase + # value: CamelCase + # - key: readability-identifier-naming.NamespaceCase + # value: lower_case + # - key: readability-identifier-naming.PrivateMemberSuffix + # value: _ + # - key: readability-identifier-naming.StructCase + # value: CamelCase diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index f3cb3d354..78fdb8e45 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -30,6 +30,7 @@ lint: - git-diff-check - gitleaks@8.24.0 - clang-format@16.0.3 + - clang-tidy@16.0.3 ignore: - linters: [ALL] paths: