reddit / emacs

Clang-tidy configuration file does not work with emacs-lsp

npchitman ยท 2022-04-30 06:50
Whatever I changed my `$HOME/.clang-tidy`, the editor always shows the same output. For example, I want to hide the diagnostic output like "Parameter name 'xx' is too short, expected at least 3 characters `[readability-identifier-length]`" in clang-tidy And this is my current `clang-tidy --list-checks | grep readability-identifier-length` output: > clang-tidy --list-checks | grep readability-identifier-length readability-identifier-length and in emacs, `flycheck-list-errors` shows: [flycheck.png](https://discourse.doomemacs.org/uploads/default/original/2X/d/d1112086e4554f1ca9c44c8c33ac108bc1a753e7.png) Now I'm adding `-readability-identifier-length` to my `$HOME/.clang-tidy` file's Checks arguments list to disable checking it: Checks: '-*, clang-analyzer-*, readability-*, modernize-*, -clang-analyzer-osx*, -readability-identifier-length ' And below is my current output: > clang-tidy --list-checks | grep readability-identifier-length > The check is hidden, so the config file should work after changing, but my `flycheck-list-errors` output does not change, no matter if I execute `lsp-restart-workspace` or restart emacs. And I've confirmed that there is no other `clang-tidy` in the parent directory except `$HOME/.clang-tidy`. ## this is my sysinfo * Emacs version: 28.1 * Operating system: Gentoo * Link to private config: [here](https://github.com/K1ngst0m/dotfiles/tree/3.0/.config/doom)