[clang-tools-extra] [clang-tidy][readability-identifier-length] Add a line count threshold (PR #185319)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 13 01:45:51 PDT 2026


================
@@ -0,0 +1,67 @@
+// RUN: %check_clang_tidy %s readability-identifier-length %t \
+// RUN: -config='{CheckOptions: \
+// RUN:  {readability-identifier-length.LineCountThreshold: 3}}' \
+// RUN: -- -fexceptions
+
+struct myexcept {
+  int val;
+};
+
+template<typename... Ts>
+void doIt(Ts...);
+
+#define MY_MACRO(arg) doIt(arg, arg)
+
+int g = 0;
+// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: variable name 'g' is too short, expected at least 3 characters [readability-identifier-length]
----------------
vbvictor wrote:

Why warning is here?

https://github.com/llvm/llvm-project/pull/185319


More information about the cfe-commits mailing list