-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clang-tidy config file support #9981
Comments
@danielbisar There is also the setting |
@michelleangela clang-tidy config will not work.
So in contrast to clang-format you cannot specify a filename to config file with this. (clang-format would allow file:PATH/TO/CONFIG). Adding --config-file= to C_Cpp.codeAnalysis.clangTidy.args kind of works, but it doesn't allow environment variables to be replaced. Neither the vscode syntax |
I don't think the extension has logic to parse or resolve environment variables passed to clang-tidy args. @sean-mcmanus could you confirm this? Is there a current workaround in case this is not supported in the near future? |
I've added code to resolve the clangTidy.args variables: #10000 -- is that sufficient or do you want to keep this issue open to track adding a new setting? |
If that allows me to use variables like in other places in vscode (https://code.visualstudio.com/docs/editor/variables-reference) this is sufficient for me. |
@danielbisar It'll work for all the variable expansion mechanisms we currently support, i.e. anything that currently works with C_Cpp.codeAnalysis.clangTidy.path or "defines" or "includePath" in c_cpp_properties.json, etc. We have some open issues tracking some VS Code variables that aren't supported yet. |
@danielbisar We support |
I'd prefer to have a new setting. You are talking about a setting to pass a .clang-tidy configuration, right? |
The fix is available with 1.13.3 (pre-release): https://github.com/microsoft/vscode-cpptools/releases/tag/v1.13.3 , i.e. the ${workspaceFolder} variable is resolved. #10006 is tracking adding a new setting. |
Feature Request
clang-tidy has the option to specify a config file. This comes in very handy when working with multiple repositories.
The option is command line option
--config-file=<string>
.This option currently cannot be used via the vscode extension.
The text was updated successfully, but these errors were encountered: