Skip to content
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

Cannot suppress clang-tidy --header-filter argument #9566

Closed
voltamund opened this issue Jul 10, 2022 · 3 comments
Closed

Cannot suppress clang-tidy --header-filter argument #9566

voltamund opened this issue Jul 10, 2022 · 3 comments
Assignees
Labels
bug Feature: Code Analysis Related to integration with clang-tidy, cppcheck, cl.exe /analyze, etc. fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix
Milestone

Comments

@voltamund
Copy link

I use the HeaderFilterRegex option inside the .clang-tidy configuration file. I want to use this option when running clang-tidy from the vscode cpptools extension or outside of vscode. Unfortunately I have not find a way to prevent cpptools from passing --header-filter argument to clang-tidy. If specified it takes precedence over the option in the .clang-tidy configuration. The only way to make it work is to use the same option that is inside .clang-tidy for "C_Cpp.codeAnalysis.clangTidy.headerFilter".
There should be a way to prevent passing --header-filter by cpptools extension.

@sean-mcmanus sean-mcmanus self-assigned this Jul 11, 2022
@sean-mcmanus sean-mcmanus added bug Language Service Feature: Code Analysis Related to integration with clang-tidy, cppcheck, cl.exe /analyze, etc. labels Jul 11, 2022
@sean-mcmanus sean-mcmanus added this to the 1.11.3 milestone Jul 11, 2022
@sean-mcmanus sean-mcmanus added quick fix fixed Check the Milestone for the release in which the fix is or will be available. labels Jul 11, 2022
@sean-mcmanus
Copy link
Collaborator

The code was written to handle this case, but there was a trivial bug with it.

@sean-mcmanus
Copy link
Collaborator

With our next release, the --header-filter won't be used if the .clang-tidy file exists (the bug was that the check for .clang-tidy was failing/incorrect).

@sean-mcmanus
Copy link
Collaborator

Fixed with 1.11.3 (pre-release): https://github.com/microsoft/vscode-cpptools/releases/tag/v1.11.3

@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Feature: Code Analysis Related to integration with clang-tidy, cppcheck, cl.exe /analyze, etc. fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix
Projects
None yet
Development

No branches or pull requests

2 participants