1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-05 11:06:00 +02:00

clang-tidy: add page (#7232)

This commit is contained in:
Jan Hensel 2021-11-01 21:00:55 +01:00 committed by GitHub
parent f68899afa6
commit 678d79f577
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,20 @@
# 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 {{path/to/file.cpp}}`
- Don't run any checks other than the `cppcoreguidelines` checks on a file:
`clang-tidy {{path/to/file.cpp}} -checks={{-*,cppcoreguidelines-*}}`
- List all available checks:
`clang-tidy -checks={{*}} -list-checks`
- Specify defines and includes as compilation options (after `--`):
`clang-tidy {{path/to/file.cpp}} -- -I{{my_project/include}} -D{{definitions}}`