microsoft / microsoft/vscode-cmake-tools
Code Analysis via Presets
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
I recently learned about these interesting "CMakeSettings.json" options in Visual Studio 2019:
```
"enableMicrosoftCodeAnalysis": true,
"enableClangTidyCodeAnalysis": true,
"clangTidyChecks" : ""
```
I wondered if anything like that could be implemented with the new CMake presets support. It looks like CMake has the solution via the `vendor` map object.
I am not aware if VS2019 will implement any such extensions via CMake presets but it would great to have unified support of the above options.
I think this should be considered as an extension to this FR: _**Enabling code analysis? #1136**_
https://devblogs.microsoft.com/cppblog/cmake-presets-integration-in-visual-studio-and-visual-studio-code/
https://learn.microsoft.com/en-us/cpp/build/cmake-presets-json-reference?view=msvc-170
https://learn.microsoft.com/en-us/cpp/code-quality/how-to-set-code-analysis-properties-for-c-cpp-projects?view=msvc-170
https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/cmake-presets.md
https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#condition
Contributor guide
Research direction
Start by reading issue #1136 and docs/cmake-presets.md, then compare CMake's vendor map and the Visual Studio CMakeSettings.json code-analysis options linked here. Determine the intended preset extension scope and how completion would be verified for Microsoft Code Analysis and clang-tidy settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, typescript, vscode
- Domain
- build-system, devtools, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100