[libcxx-commits] [libcxxabi] [libc++abi][NFC] Add a clang-tidy config (PR #207324)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 2 22:21:41 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxxabi

Author: Nikolas Klauser (philnik777)

<details>
<summary>Changes</summary>

This essentially copies the `.clang-tidy` file from libc++ into libc++abi, except that the naming conventions are updated to not add underscores.

This isn't enforced for now, but that should be done at some point.


---
Full diff: https://github.com/llvm/llvm-project/pull/207324.diff


1 Files Affected:

- (added) libcxxabi/.clang-tidy (+54) 


``````````diff
diff --git a/libcxxabi/.clang-tidy b/libcxxabi/.clang-tidy
new file mode 100644
index 0000000000000..766a0ca125b05
--- /dev/null
+++ b/libcxxabi/.clang-tidy
@@ -0,0 +1,54 @@
+Checks: >
+  bugprone-copy-constructor-init,
+  bugprone-dangling-handle,
+  bugprone-infinite-loop,
+  bugprone-stringview-nullptr,
+  bugprone-use-after-move,
+
+  libcpp-*,
+
+  llvm-include-order,
+  llvm-namespace-comment,
+
+  misc-definitions-in-headers,
+  misc-misplaced-const,
+  misc-non-copyable-objects,
+  misc-uniqueptr-reset-release,
+
+  modernize-loop-convert,
+  modernize-redundant-void-arg,
+  modernize-use-nullptr,
+  modernize-use-override,
+  modernize-use-equals-delete,
+
+  readability-duplicate-include,
+  readability-identifier-naming,
+  readability-function-cognitive-complexity,
+  readability-function-size,
+  readability-misplaced-array-index,
+  readability-redundant-control-flow,
+  readability-redundant-function-ptr-dereference,
+  readability-redundant-preprocessor,
+  readability-simplify-boolean-expr,
+  readability-simplify-subscript-expr,
+  readability-uniqueptr-delete-release,
+
+CheckOptions:
+  - key:   readability-function-cognitive-complexity.Threshold
+    value: 143 # TODO: bring that number down
+  - key:   readability-function-size.LineThreshold
+    value: 194 # TODO: bring that number down
+  - key:   readability-identifier-naming.GetConfigPerFile
+    value: false
+  - key:   readability-identifier-naming.ParameterCase
+    value: lower_case
+  - key:   readability-identifier-naming.PrivateMemberCase
+    value: lower_case
+  - key:   readability-identifier-naming.LocalVariableCase
+    value: lower_case
+  - key:   readability-identifier-naming.TemplateParameterCase
+    value: CamelCase
+  - key:   readability-identifier-naming.ValueTemplateParameterCase
+    value: CamelCase
+  - key:   readability-identifier-naming.ValueTemplateParameterIgnoredRegexp
+    value: (__[a-z_]|_[A-Z]).* # TODO: Converge on a single style for value template parameters

``````````

</details>


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


More information about the libcxx-commits mailing list