clang-tidy
An LLVM-based C/C++ linter to find style violations, bugs, and security flaws through static analysis. More information: https://clang.llvm.org/extra/clang-tidy/.
- Run default checks on a source file:
clang-tidy
- Don't run any checks other than the
cppcoreguidelineschecks on a file:
clang-tidy -checks=
- List all available checks:
clang-tidy -checks= -list-checks
- Specify defines and includes as compilation options (after
--):
clang-tidy -- -I -D
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
