[libcxx-commits] [libcxx] [libc++] run clang-tidy on src/ in the CI (PR #121198)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 27 02:05:46 PST 2024


https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/121198

None

>From 6ff652601190c5fa6ab5c5c64cf1218495eaf3fb Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Fri, 27 Dec 2024 11:05:25 +0100
Subject: [PATCH] [libc++] run clang-tidy on src/ in the CI

---
 libcxx/src/.clang-tidy       | 17 ++++++++++++++++-
 libcxx/utils/ci/run-buildbot |  1 +
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/libcxx/src/.clang-tidy b/libcxx/src/.clang-tidy
index ec8f2e0a76a3c4..dfbc49fa9d069c 100644
--- a/libcxx/src/.clang-tidy
+++ b/libcxx/src/.clang-tidy
@@ -1,4 +1,19 @@
 InheritParentConfig: true
 
 Checks: >
-  -readability-identifier-naming
+  -clang-analyzer-*,
+
+  -llvm-include-order,
+
+  -modernize-loop-convert,
+  -modernize-use-equals-delete,
+  -modernize-use-nullptr,
+  -modernize-use-override,
+
+  -readability-identifier-naming,
+  -readability-function-cognitive-complexity,
+  -readability-function-size,
+  -readability-simplify-boolean-expr,
+
+# TODO: Consider enabling clang-analyzer. Without the checks clang-tidy runs 18x
+# faster on my system.
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index f1ede6474eb9ee..5eca2ad5c69fc4 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -328,6 +328,7 @@ generic-cxx26)
     generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx26.cmake"
     check-runtimes
     check-abi-list
+    run-clang-tidy -warnings-as-errors \* -source-filter ".*libcxx/src.*" -p "${BUILD_DIR}"
 ;;
 #
 # Other compiler support



More information about the libcxx-commits mailing list