简体   繁体   中英

How to configure clang checkers when using flycheck

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM