Closed jlj-ee closed 1 year ago
@jlj-ee Setting "C_Cpp.codeAnalysis.clangTidy.path": "file:${workspaceFolder:common}/.clang-tidy"
is not valid. See https://releases.llvm.org/16.0.0/tools/clang/tools/extra/docs/clang-tidy/ . You'd need to use something like "C_Cpp.codeAnalysis.clangTidy.args": [ "--config-file=${workspaceFolder:common}/.clang-tidy" ]
.
@sean-mcmanus Thanks for the info! Yes, I see I was mixing up that property, since C_Cpp.codeAnalysis.clangTidy.path is just the path to the binary. But there was a path resolution bug for C_Cpp.clang_format_style?
Yeah, the clang_format_style will be fixed for 1.15.2 (pre-release).
Environment
Bug Summary and Steps to Reproduce
Bug Summary: Setting clang-format via file:${workspaceFolder} works well per https://github.com/microsoft/vscode-cpptools/issues/9786. However, using the standard multi-root workspace syntax
file:${workspaceFolder:someOtherFolder}
causes the path to no longer be expanded, e.g.ms-vscode.cpptools-1.14.5-win32-x64/bin/../LLVM/bin/clang-format.exe -style=file:${workspaceFolder:common}/.clang-format
Per the multi-root workspace docs
While I can work around this by using the actual relative/absolute path instead of ${workspaceFolder:someOtherFolder}, the multi-root scoping syntax works fine in other places in this extension, e.g. in includePath/browsePath, so it seemed reasonable to expect the syntax to work for specifying clang-format/clang-tidy files as well.
Steps to reproduce:
"C_Cpp.clang_format_style"
to e.g.file:${workspaceFolder:common}/.clang-format
Expected behavior: Path would be expanded to the correct multi-root workspace folder so that formatting completes successfully.
Configuration and Logs
Other Extensions
No response
Additional context
No response