[英]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.当通过 clang-tidy 手动使用 clang 检查器时,我可以使用 .clang-tidy 文件添加和删除一些检查。
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.然而,当在 emacs 中使用 lsp-mode 时,激活 flycheck,运行 clang 检查器,这很好,但是没有使用 my.clang-tidy 配置文件。 How should I tell flycheck/clangd to ignore some warnings?
我应该如何告诉 flycheck/clangd 忽略一些警告?
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:在文件
lsp-clangd
中有变量lsp-clients-clangd-args
可以配置为考虑clang-tidy
,如下例所示:
(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.还要检查文件
lsp-clangd
,它有一些用于 flycheck 和 clang-tidy 的新函数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.