Skip to content

Commit cd064cb

Browse files
committed
docs: explain include paths for third-party libraries and drop a private-repo claim
Follows up on @2bndy5's comments on #62. **Third-party libraries in the clang-tidy guide.** Step 2 said to install dependencies before the configure step, but not why: clang-tidy finds a library's headers only through the `-I` paths the compiler gets for each file, which it reads from the compilation database. The bullet now says so, and shows how to pass those paths with `extra-args` when there is no build system (`-Ithird_party/fmt/include`, written without a space because `extra-args` splits on spaces). **Private repositories on the home page.** #70 said the step summary also works "in private repositories, where thread comments are turned off". That came from the note on `thread-comments` in cpp-linter-action's `action.yml`, but cpp-linter has no code that turns thread comments off for private repositories; its requests ask for `application/vnd.github.raw+json`, the change that addressed cpp-linter-action#142. As discussed on #62, whether thread comments work on a private repository still needs a test run, so the card no longer says anything about private repositories.
1 parent 788125a commit cd064cb

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎docs/blog/posts/2026-09-20-clang-tidy-pull-requests-github-actions.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,11 @@ language standard of the real build. It reads them from a compilation database,
107107

108108
Two things commonly go wrong here:
109109

110-
- **Third-party dependencies.** If the configure step runs `find_package(Foo)`, install
111-
`libfoo-dev` (or restore your vcpkg/Conan cache) before it, exactly as your build job does.
110+
- **Third-party libraries.** clang-tidy finds a library's headers only through the `-I` paths
111+
the compiler gets for each file, and it reads those from the database. Install the library
112+
before the configure step, as your build job does (`libfoo-dev`, or your vcpkg or Conan cache),
113+
so `find_package(Foo)` succeeds and its include paths are recorded. Without a build system, add
114+
the paths to `extra-args` yourself, for example `-Ithird_party/fmt/include`.
112115
- **Generated headers.** Protobuf output, `config.h` and similar files only exist after the build
113116
step that produces them. Build those targets before running clang-tidy.
114117

‎docs/overrides/home.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ <h3 class="cl-h3">Thread Comment</h3>
282282
<h3 class="cl-h3">Step Summary</h3>
283283
<code class="cl-inline-code">step-summary</code>
284284
</div>
285-
<p>Set step-summary: true and the same report is added to the job summary of the workflow run. It needs no write access, so it also works on pull requests from forks and in private repositories, where thread comments are turned off.</p>
285+
<p>Set step-summary: true and the same report is added to the job summary of the workflow run. It needs no write access, so it also works on pull requests from forks.</p>
286286
</article>
287287
<article class="cl-outcome">
288288
<div class="cl-outcome__art" aria-hidden="true">

0 commit comments

Comments
 (0)