0

When using clang checkers via clang-tidy manually, I can add and remove some checks using a .clang-tidy file.

However when using lsp-mode within emacs, with flycheck activated, clang checkers are run, which is fine, but my .clang-tidy configuration file is not used. How should I tell flycheck/clangd to ignore some warnings ?

shodanex
  • 14,975
  • 11
  • 57
  • 91

1 Answers1

1

In file lsp-clangd there is the variable lsp-clients-clangd-args which can be configured to take into account clang-tidy as in below example:


(setq lsp-clients-clangd-args '("-j=4" "--background-index" "--clang-tidy" "--completion-style=detailed" "-log=error"))

Check also the file lsp-clangd which has some new functions for flycheck and clang-tidy.

Yoan
  • 161
  • 3
  • 8