Compiling c++ code by VS Code is always blocked by clang-tidy error 'Error running 'clang-tidy'

19 views Asked by At

I've created a minimal CMake project on Windows, which includes only a single C++ file. Despite setting "C_Cpp.codeAnalysis.clangTidy.enabled": false in my VSCode settings, I continue to encounter clang-tidy errors when building the project.

This issue seems to arise specifically when using the Ninja generator, which I prefer for its ability to generate compile_commands.json. Here's a brief overview of my setup:

  • Platform: Windows
  • Build system: CMake with Ninja generator
  • VSCode setting to disable clang-tidy: "C_Cpp.codeAnalysis.clangTidy.enabled": false

I'm looking for a way to resolve these clang-tidy errors without switching away from the Ninja generator. Has anyone faced a similar issue, or does anyone know how to properly disable clang-tidy under these conditions?

0

There are 0 answers