From documentation : -p is used to read a compile command database. For example, it can be a CMake build directory in which a file named compile_commands.json exists (use -DCMAKE_EXPORT_COMPILE_COMMANDS=ON CMake option to get this output). When no build path is specified, a search for compile_commands.json will be attempted through all parent paths of the first input file . See: https://clang.llvm.org/docs/HowToSetupToolingForLLVM.html for an example of setting up Clang Tooling on a source tree. Answer from the_poope on reddit.com
🌐
GitHub
github.com › notskm › vscode-clang-tidy
GitHub - notskm/vscode-clang-tidy · GitHub
March 25, 2023 - clang-tidy.buildPath: Path to the build folder.
Starred by 51 users
Forked by 29 users
Languages   TypeScript
🌐
Microsoft
devblogs.microsoft.com › dev blogs › c++ team blog › visual studio code c++ december 2021 update: clang-tidy
Visual Studio Code C++ December 2021 Update: clang-tidy - C++ Team Blog
December 21, 2021 - You can point the C++ extension to any clang-tidy binary by editing the C++ extension’s Clang Tidy: Path setting.
🌐
GitHub
github.com › microsoft › vscode-cpptools › issues › 13207
clang-tidy and passing Include paths · Issue #13207 · microsoft/vscode-cpptools
January 28, 2025 - Feature request when using clang-tidy. I have a VS Code project using C++ with has include directories listed in the c_cpp_properties.json. I am also using the CMake Tools extension in use to build the project. From my understanding if you set the configurationProvider, which I have as ms-vcode.cmake-tools, then the includePath set in c_cpp_properties will be ignored.
Author   microsoft
🌐
Reddit
reddit.com › r/cpp › clang-tidy support in vscode is possible
r/cpp on Reddit: clang-tidy support in VSCode is possible
October 21, 2020 -

if you're an exceptionally attractive individual like me, the only things preventing you from retiring clion and adopting vscode (for everything) are clang-tidy and cppcheck. we can get clang-tidy by upvoting this feature request for adding clang-tidy support to the cpp extension for vscode: https://github.com/microsoft/vscode-cpptools/issues/2908

clang-tidy good. more clang-tidy.

🌐
Reddit
reddit.com › r/cpp_questions › vscode & clang-tidy and other tools
r/cpp_questions on Reddit: VScode & clang-tidy and other tools
November 9, 2024 -

Hello,

I am working through various complaints from clang-tidy, clang and cppcheck. I have a couple questions with a Vulkan CMake project . I am having a bit of time setting everything properly. Note everything builds with Cmake.

  1. with Clang-tidy I know of the .clang-tidy file in project root directory. But I am not understanding how to let clang-tidy know of the Include paths. It is finding the Vulkan header files though I at this point I am not certain how. However it is not finding GLFW/glfw3.h header files. I am at a loss of how to proceed. CoPilot mentions compile_commands.json but creating one has not solved my problem.

  2. flylint has a number of settings including for includePaths. The questions will clang and cppcheck inherit the includePaths setting from the flylint.includePaths variable or do I have to set those all separately . Of course this course if inheritance should apply to a number of other flylint variables.

Thanks,

Frank

🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
Clang-Tidy-On-Active-File - Visual Studio Marketplace
Extension for Visual Studio Code - Run clang-tidy and display results within VSCode.
Find elsewhere
🌐
GitHub
github.com › clangd › vscode-clangd
GitHub - clangd/vscode-clangd: Visual Studio Code extension for clangd · GitHub
Most clang-tidy checks are supported (these can be enabled using a .clang-tidy file).
Starred by 812 users
Forked by 165 users
Languages   TypeScript
🌐
Microsoft Learn
learn.microsoft.com › en-us › cpp › code-quality › clang-tidy
Using Clang-Tidy in Visual Studio | Microsoft Learn
Manually type in the path or Browse and select the path under the Clang-Tidy Tool Directory property.
🌐
GitHub
github.com › openblack › openblack › wiki › Getting-clang‐tidy-working-on-Windows-with-VSCode
Getting clang‐tidy working on Windows with VSCode
August 31, 2024 - Make sure you update the following on your computer (add to path when asked and use x64) ... In order to make sure that msvc will be found properly, Find and open the terminal for x64 Native Tools Command Prompt for VS 2022. Navigate to your project directory. You can also do your git commands in this terminal if you want. Type code . to launch vscode in the current directory · Install the cmake Tools and clangd extensions and uninstall or disable the Microsoft C++ extension if it's installed.
Author   openblack
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
CS 128 Clang-Tidy - Visual Studio Marketplace
March 27, 2023 - Visual Studio Code>Linters>CS 128 Clang-TidyNew to Visual Studio Code?
🌐
GitHub
github.com › microsoft › vscode-cpptools › issues › 9032
Include paths from c_cpp_properties.json are not passed to clang-tidy for code analysis · Issue #9032 · microsoft/vscode-cpptools
March 16, 2022 - Feature: Code AnalysisRelated to integration with clang-tidy, cppcheck, cl.exe /analyze, etc.Related to integration with clang-tidy, cppcheck, cl.exe /analyze, etc.Language ServicefixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.quick fix ... I have a c_cpp_properties.json file defined in the repo and it contains quite a few entries under includePath. Those include paths are not passed to clang-tidy when I run the code analysis and so I always have errors with not found header files.
Author   microsoft
🌐
Clang
clang.llvm.org › extra › clang-tidy › Integrations.html
Clang-tidy IDE/Editor Integrations — Extra Clang Tools 23.0.0git documentation
For Vim, you can use Syntastic, which includes clang-tidy, or A.L.E., a lint engine that applies clang-tidy along with other linters. ... clang-tidy is integrated in CPPDepend starting from version 2018.1 and CPPCheck 1.82. CPPCheck integration lets you import Visual Studio solutions and run the clang-tidy inspection on them.
🌐
Clang
clang.llvm.org › extra › clang-tidy
Clang-Tidy — Extra Clang Tools 23.0.0git documentation
"./" prefixes in the relative files will be automatically removed, but the rest of a relative path must be a suffix of a path in the compile command database. Parameters files: A large number of options or source files can be passed as parameter files by use '@parameter-file' in the command line. Configuration files: clang-tidy attempts to read configuration for each source file from a .clang-tidy file located in the closest parent directory of the source file.
🌐
Reddit
reddit.com › r/vscode › vscode & clang-tidy and other tools
r/vscode on Reddit: VScode & clang-tidy and other tools
November 8, 2024 -

Hello,

I am working through various complaints from clang-tidy, clang and cppcheck. I have a couple questions with a Vulkan CMake project . I am having a bit of time setting everything properly. Note everything builds with Cmake.

  1. with Clang-tidy I know of the .clang-tidy file in project root directory. But I am not understanding how to let clang-tidy know of the Include paths. It is finding the Vulkan header files though I at this point I am not certain how. However it is not finding GLFW/glfw3.h header files. I am at a loss of how to proceed. CoPilot mentions compile_commands.json but creating one has not solved my problem.

  2. flylint has a number of settings including for includePaths. The questions will clang and cppcheck inherit the includePaths setting from the flylint.includePaths variable or do I have to set those all separately . Of course this course if inheritance should apply to a number of other flylint variables.

Thanks,

Frank

🌐
GitHub
github.com › microsoft › vscode-cpptools › discussions › 10132
clang-tidy command line? · microsoft/vscode-cpptools · Discussion #10132
I am trying to figure out why ... as "-Imy_path/to/the/files". The build (clang and/or gcc and/or aarch64-linux-g++) all build fine with no errors. I am using the cmake extension in VSCode to generate the makefile (Ninja) and run the build. I can't find the reason why the #include files are not being found by clang-tidy, so it seems ...
Author   microsoft