Clang-tidy cmdline checks
Add two command line options: --clang-tidy: run clang-tidy, needs to be in PATH and only in combination with --project pointing at VS sln or compile-commands.json (not needed when using GUI project files that already set clang-tidy)
--clang-tidy-checks: the important one. If not set, defaults to the same values as hard-coded so far. Otherwise, use clang-tidy syntax to forward to -checks= (for example '-,hicpp-' to disable all but hicpp checks. If setting to ".clang-tidy" or empty string ('--clang-tidy-checks=') it will not set -checks at all, letting clang-tidy use the default behavior of searching for .clang-tidy files "upward" from the analyzed source file.
hmm.. my idea was to keep command line interface somewhat simple. only basic options there..
so I believe clang-tidy can currently be executed if user configures it from the GUI.
Triggering it from cmd line is somewhat optional, but (and I might be blind) I can't find any way to actually configure the checks and the default is running almost everything, so you end up with several "don't use C-array" checks and some odd combinations like "modernize-use trailing return type everyhwere" and "fuchsia-don't use trailing return type, except...". Drowning in 20k nitpicky and often nonsensical findings in an unreadable console dump was what made us look for other options, but since it's such a popular tool, not everybody can be talked into dropping it completely.
I agree, it would be more consistent if that could be configured through the GUI and made part of the project file. That way it would work for GUI and cmd line. Or even just have a single switch between hardcoded settings and no settings (ie. let clang search for .clang-tidy files).
it's ok to add some option to configure clang-tidy checks in the GUI.
(ie. let clang search for .clang-tidy files)
if there are .clang-tidy files it sounds good to use those.