Skip to content

Commit 2a7e33c

Browse files
committed
[clang-tidy][docs] Update run-clang-tidy.py usage examples to include build directory option
1 parent 3ada15a commit 2a7e33c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clang-tools-extra/docs/clang-tidy/index.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,16 +361,16 @@ Example invocations:
361361
.. code-block:: console
362362
363363
# Run clang-tidy on all files in the compilation database in parallel
364-
$ run-clang-tidy.py
364+
$ run-clang-tidy.py -p=build/
365365
366366
# Run with specific checks and apply fixes
367-
$ run-clang-tidy.py -fix -checks=-*,readability-*
367+
$ run-clang-tidy.py -p=build/ -fix -checks=-*,readability-*
368368
369369
# Run on specific files/directories with header filtering
370-
$ run-clang-tidy.py -header-filter=src/ src/
370+
$ run-clang-tidy.py -p=build/ -header-filter=src/ src/
371371
372372
# Run with parallel execution (uses all CPU cores by default)
373-
$ run-clang-tidy.py -j 4
373+
$ run-clang-tidy.py -p=build/ -j 4
374374
375375
Running Clang-Tidy on Diff
376376
---------------------------
@@ -422,7 +422,7 @@ relying solely on it may lead to incomplete analysis. Since the script only
422422
reports warnings from the modified lines, it may miss issues that are caused
423423
by the changes but manifest elsewhere in the code. For example, changes that
424424
only add lines to a function may cause it to violate size limits (e.g.,
425-
``readability-function-size``), but the diagnostic will be reported at the
425+
`readability-function-size <checks/readability/function-size.html>`_), but the diagnostic will be reported at the
426426
function declaration, which may not be in the diff and thus filtered out.
427427
Modifications to header files may also affect many implementation files, but
428428
only warnings in the modified header lines will be reported.

0 commit comments

Comments
 (0)