How to use clang-tidy
clang-tidy
is a command-line tool that automatically enforces certain aspects of code style and provides warnings for common programming mistakes. It automatically runs on every pull request in the Quokka GitHub repository.
Using clang-tidy with VSCode
The easiest way to use clang-tidy
on your own computer is to install the clangd extension for Visual Studio Code (VSCode).
(VSCode itself can be downloaded here.)
Command-line alternative
You can also run clang-tidy
from the command line (see the documentation).
To see the clang-tidy
warnings that are relevant only to the code changes you've made, you can use the clang-tidy-diff.py Python script.