Skip to content

Commit

Permalink
Enable few slow clang-tidy checks for clangd
Browse files Browse the repository at this point in the history
In ClickHouse#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 <[email protected]>
  • Loading branch information
azat committed May 13, 2023
1 parent 944100c commit 87b5ab2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -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,
]
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ website/package-lock.json
/.ccls-cache

# clangd cache
/.clangd
/.cache

/compile_commands.json
Expand Down

0 comments on commit 87b5ab2

Please sign in to comment.