RunClangTidy is a Visual Studio 2019 extension that allows to run clang-tidy from the solution explorer project or file context menu.
Plugin can be configured via Tools|Options|clang-tools
-
clang-tidy analysis options: clang-tidy command line options
-
clang-tidy location: path to clang-tidy
-
compile command: command used in clang compilation database command string
Plugin adds following menu commands:
- Generate Compilation Database... Generates clang compilation database (compile_commands.json) for the current project. Compilation database is used for clang-tidy analysis and needs to be updated when file is added or removed from a project.
- Run Clang-Tidy Runs clang-tidy for the current project or file selection and prints output to Clang Output window. Clang-tidy warnings and errors are added to Error List window and highlighted in the editor pane: