Adds a command line flag clang-tidy-config for specifing configuration of checks, in much the same way that clang-tidy does.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Good/bad news on timing here...
I'd like to introduce a config system (user config file, but also eventually in-project .clangd files, extensible over LSP etc).
It'll provide a generic way to apply different config to different files.
And it'll be YAML files on disk so it'll be simpler to supply such structured config (and still possible to provide config on the command-line).
I was literally going to send the design doc out today: http://tinyurl.com/clangd-config
This would replace most of our separate "user-pref"-like command-line flags (deprecate and maybe eventually remove).
As such I'm not sure introducing another one for fairly deep config is a good idea.
On the other hand, the scope for the config would be deliberately small for the LLVM 11 release, so we'd probably want to add clang-tidy config after the branch in a month, delaying it for one release cycle. How pressing is this?
Gotta say it's not hugely pressing.
The reason for it is clangd lets you specify some checks to run but it doesn't let you specify the options for those checks. Effectively forcing each project to require a .clang-tidy configuration file if you want to use checks where you require some configuration.
This isn't an issue on large scale established projects, but when starting out on small scale projects, it would be nice if clangd(tidy) was already set up how you like it without going through the need of setting up a .clang-tidy file.
Once D81949 lands it will also be useful on large scale projects that enforce certain tidy checks, but locally a developer may want extra configurable checks running in their editor.
Having said all of that your proposal does appear to do what this patch aims just in a much more user friendly way.