diff --git a/libc/.clang-tidy b/libc/.clang-tidy index dbde88928ee63..bd09aae981ba9 100644 --- a/libc/.clang-tidy +++ b/libc/.clang-tidy @@ -6,6 +6,8 @@ CheckOptions: value: CamelCase - key: readability-identifier-naming.StructCase value: aNy_CasE + - key: readability-identifier-naming.StructIgnoredRegexp + value: "_?(_[A-Za-z0-9]+)*" - key: readability-identifier-naming.MemberCase value: lower_case - key: readability-identifier-naming.MemberIgnoredRegexp @@ -14,6 +16,10 @@ CheckOptions: value: lower_case - key: readability-identifier-naming.VariableIgnoredRegexp value: "_?(_[A-Za-z0-9]+)*" + - key: readability-identifier-naming.ParameterCase + value: lower_case + - key: readability-identifier-naming.ParameterIgnoredRegexp + value: "_?(_[A-Za-z0-9]+)*" - key: readability-identifier-naming.FunctionCase value: lower_case - key: readability-identifier-naming.FunctionIgnoredRegexp @@ -26,6 +32,8 @@ CheckOptions: value: UPPER_CASE - key: readability-identifier-naming.ConstexprVariableCase value: UPPER_CASE + - key: readability-identifier-naming.ConstexprVariableIgnoredRegexp + value: "is(_[A-Za-z0-9]+)*_v" - key: readability-identifier-naming.ConstexprFunctionCase value: lower_case - key: readability-identifier-naming.GetConfigPerFile diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake index 142778d9ea1cc..c8a20341ff74f 100644 --- a/libc/cmake/modules/LLVMLibCObjectRules.cmake +++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake @@ -355,7 +355,7 @@ function(create_entrypoint_object fq_target_name) # Until this is fixed upstream, we use -fno-caret-diagnostics to surpress # these. COMMAND ${LLVM_LIBC_CLANG_TIDY} - "--extra-arg=-fno-caret-diagnostics" --quiet + "--extra-arg=-fno-caret-diagnostics" --quiet --fix # Path to directory containing compile_commands.json -p ${PROJECT_BINARY_DIR} ${ADD_ENTRYPOINT_OBJ_SRCS} diff --git a/libc/include/.clang-tidy b/libc/include/.clang-tidy new file mode 100644 index 0000000000000..a6c02dd90e4d2 --- /dev/null +++ b/libc/include/.clang-tidy @@ -0,0 +1,3 @@ +InheritParentConfig: false +Checks: '' +HeaderFilterRegex: '.*' diff --git a/libc/src/.clang-tidy b/libc/src/.clang-tidy index 1c79b1cf6aae6..7e97dac43d38a 100644 --- a/libc/src/.clang-tidy +++ b/libc/src/.clang-tidy @@ -4,4 +4,4 @@ HeaderFilterRegex: '.*' WarningsAsErrors: 'llvmlibc-*' CheckOptions: - key: llvmlibc-restrict-system-libc-headers.Includes - value: '-*, linux/*, asm/*.h, asm-generic/*.h' + value: '-*, linux/*, asm/*.h, asm-generic/*.h. sys/syscall.h'