I am not using CMake and I could not figure out how to build the compile_commands.json file separately; so, I have created a custom script that runs clang tidy on files. In Linux, the command works without issues:
clang-tidy -header-filter=.* --p=file --quiet $ENGINE_FILES -- --std=c++20 \
$SYSTEM_INCLUDES -isystem./engine/src -isystem./engine/rhi/core/include -isystem./platform/base/include
Now, I try to use the same mechanism using Windows + Powershell:
clang-tidy -header-filter=.* --p=file --quiet "engine/src/liquid/window/Window.cpp" -- --std=c++20 -isystem.\engine\src -isystem.\vendor\Debug\include -isystem.\platform\base\include
I get an error:
Error while processing C:\repos\liquid-engine\engine\src\liquid\window\Window.cpp.
error: unable to handle compilation, expected exactly one compiler job in '' [clang-diagnostic-error]
How can I pass the correct arguments to clang-tidy
on Windows.
EDIT: Interestingly, the actual linting works. I purposefully added code that the linter would fail on and clang-tidy actually worked. However, if everything is successful, clang-tidy throws this error about compiler job.