clang-tidy
An LLVM-based C/C++ linter to find style violations, bugs, and security flaws through static analysis. tldr-pages
On several platforms
Several platforms
Run default checks on a source file
clang-tidy path/to/file.cppIdentifyDon't run any checks other than the cppcoreguidelines checks on a file
clang-tidy path/to/file.cpp -checks=-*,cppcoreguidelines-*IdentifyList all available checks
clang-tidy -checks=* -list-checksIdentifySpecify defines and includes as compilation options (after --)
clang-tidy path/to/file.cpp -- -Imy_project/include -DdefinitionsIdentify