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

Option to set --extra-arg #89

Open
bwrsandman opened this issue Jul 7, 2023 · 2 comments
Open

Option to set --extra-arg #89

bwrsandman opened this issue Jul 7, 2023 · 2 comments

Comments

@bwrsandman
Copy link
Contributor

bwrsandman commented Jul 7, 2023

I'm running into an issue where I'm getting an irrelevant warning on my source code that happens when a define is not set.
This is a check to prevent inclusion of certain headers without the define.

When compiling, the correct cpp files have the define but clang-tidy will not have them when analyzing the header itself.

The solution to this is adding --extra-arg=-DMY_DEFINE to the command line.
In clang-tidy 17, you can set this in the config with ExtraArgs but I'm currently on 15.

Either way, I don't see such an option in clang-tidy-review

Note that multiple --extra-arg can be set one after the other.

@BotellaA
Copy link

This option would be very useful!

@ZedThree
Copy link
Owner

Sounds good. Not sure I'll have much time to implement this myself for awhile, but PRs always welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants