From 87b5ab2fcda9b8754243a48f51027f11d2e2287d Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 13 May 2023 13:59:49 +0200 Subject: [PATCH] Enable few slow clang-tidy checks for clangd In #47424 the readability-identifier-naming had been disabled for clang-tidy builds, but the code base is already uses this notations, so at least, let's enable it for clangd, so that developers who are using editor/IDE with clangd will be warned. FWIW clangd does not think that this check is slow [1], but I guess this file hadn't been updated for quite a while. [1]: https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clangd/TidyFastChecks.inc Signed-off-by: Azat Khuzhin --- .clangd | 16 ++++++++++++++++ .gitignore | 1 - 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .clangd diff --git a/.clangd b/.clangd new file mode 100644 index 00000000000..ad471db8d8b --- /dev/null +++ b/.clangd @@ -0,0 +1,16 @@ +Diagnostics: + # clangd does parse .clang-tidy, but some checks are too slow to run in + # clang-tidy build, so let's enable them explicitly for clangd at least. + ClangTidy: + # The following checks had been disabled due to slowliness with C++23, + # for more details see [1]. + # + # [1]: https://github.com/llvm/llvm-project/issues/61418 + # + # But the code base had been written in a style that had been checked + # by this check, so at least, let's enable it for clangd. + Add: [ + # configured in .clang-tidy + readability-identifier-naming, + bugprone-reserved-identifier, + ] diff --git a/.gitignore b/.gitignore index 14b860244c2..a04c60d5ca3 100644 --- a/.gitignore +++ b/.gitignore @@ -129,7 +129,6 @@ website/package-lock.json /.ccls-cache # clangd cache -/.clangd /.cache /compile_commands.json