aboutsummaryrefslogtreecommitdiff
path: root/libc/.clang-tidy
diff options
context:
space:
mode:
authorSiva Chandra Reddy <sivachandra@google.com>2021-12-08 07:02:48 +0000
committerSiva Chandra Reddy <sivachandra@google.com>2021-12-09 00:19:25 +0000
commita5a79f69d6262e46f38126198be7f58932e11080 (patch)
treeb172e07e355e7c636148b696609174ceeb3f14a4 /libc/.clang-tidy
parentf75cce0be861b9dc7370590265036c9a9027bdc7 (diff)
downloadllvm-a5a79f69d6262e46f38126198be7f58932e11080.zip
llvm-a5a79f69d6262e46f38126198be7f58932e11080.tar.gz
llvm-a5a79f69d6262e46f38126198be7f58932e11080.tar.bz2
[libc] Add a .clang-tidy file for the toplevel libc directory.
Generation of the .yaml has been removed to prevent lint from running with every ninja invocation. The new .clang-tidy file is copied to the libc build directory so that generated files also get checked. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D115405
Diffstat (limited to 'libc/.clang-tidy')
-rw-r--r--libc/.clang-tidy24
1 files changed, 24 insertions, 0 deletions
diff --git a/libc/.clang-tidy b/libc/.clang-tidy
new file mode 100644
index 0000000..a1dba68
--- /dev/null
+++ b/libc/.clang-tidy
@@ -0,0 +1,24 @@
+InheritParentConfig: false
+Checks: 'readability-identifier-naming'
+HeaderFilterRegex: '.*'
+CheckOptions:
+ - key: readability-identifier-naming.ClassCase
+ value: CamelCase
+ - key: readability-identifier-naming.StructCase
+ value: aNy_CasE
+ - key: readability-identifier-naming.MemberCase
+ value: lower_case
+ - key: readability-identifier-naming.MemberIgnoredRegexp
+ value: "^_[A-Za-z0-9_]+$"
+ - key: readability-identifier-naming.VariableCase
+ value: lower_case
+ - key: readability-identifier-naming.VariableIgnoredRegexp
+ value: "^_[A-Za-z0-9_]+$"
+ - key: readability-identifier-naming.FunctionCase
+ value: lower_case
+ - key: readability-identifier-naming.FunctionIgnoredRegexp
+ value: "^_[A-Za-z0-9_]+$"
+ - key: readability-identifier-naming.ConstexprVariableCase
+ value: UPPER_CASE
+ - key: readability-identifier-naming.GetConfigPerFile
+ value: true