require clang-tidy check argument


Is there a way/pattern for a clang-tidy check to require an argument (ie an entry in the .clang-tidy file)?

Looking at the API It has a way for me to storeOptions, but will always have a Default value.


Hi Tiago,

That support was adding in You can call Options.get("Name") or Options.get<Inttype>("Name") and it will return llvm::Expected<...>.
If there is no option found in the config it will return a MissingOptionError, If there is an option but it couldnt’t be parsed to the Type it will return a UnparseableIntegerOptionError. you can just log the Error straight to llvm::errs().


Nathan James