Currently due to missing DiagnosticsEngine when invalid
enum config value is passed to check, and --dump-config
is used, clang-tidy would crash. This change fixes this
and extends --verify-config command to actually verify
those invalid enum values instead of ignoring them and
printing that 'No config errors detected.'.
Fixes:
I don't think this is the correct approach here
getAllChecksAndOptions should instead return an llvm::Expected<NamesAndOptions>.
You can create an error class that wraps a std::vector<ClangTidyError> and then still get the same behaviour on the error path.