From 65fbe78c4af1b8c809b1c68e729ca57ef7b77679 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Fri, 5 Apr 2024 08:20:10 +0200 Subject: [PATCH] Add a hint for generating the compile command outside --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1287c39..ca41d06 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ at once, so `clang-tidy-review` will only attempt to post the first - `total_comments`: Total number of warnings from clang-tidy -## Generating `compile_commands.json` inside the container +## Generating `compile_commands.json` Very simple projects can get away without a `compile_commands.json` file, but for most projects `clang-tidy` needs this file in order to @@ -158,6 +158,10 @@ jobs: If you don't use CMake, this may still work for you if you can use a tool like [bear](https://github.com/rizsotto/Bear) for example. +You can also generate this file outside the container, e.g. by adding +`-DCMAKE_EXPORT_COMPILE_COMMANDS=ON` to a cmake command in an earlier +action and omitting the `cmake_command` paramter. + ## Use in a non-default location If you're using the `container` argument in your GitHub workflow,