Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have a maybe controversial addon here (probably wen can make it configurable somehow), but I think this might help other users as well.
Background:
our clang-tidy config (probably others as well) have this configuration inside:
That way we include our own code that only lives in the header files in the clang-tidy check.
Actually, the config is a little bit simplified. It looks like this in reality:
The reason for this overly complex regex is:
external/
)Now this worked for most things in the codebase, until I saw a special case:
include_prefix
orstrip_include_prefix
, then paths likepath/to/$PACKAGE/_virtual_includes/$TARGET
are generated and put on the include pathThe best solution would be to change clang-tidy of course. This change here would probably help other users as well as it excludes those paths by putting them into the system includes.
The patch should not generate problems because:
_virtual_includes
should not be a common folder name that a user chooses manuallyHeaderFilterRegex
is unset, this change has no effect as everything is excluded anyway