diff --git a/core/clang/tidy.mk b/core/clang/tidy.mk index 868f7bc88..8a408785f 100644 --- a/core/clang/tidy.mk +++ b/core/clang/tidy.mk @@ -36,7 +36,7 @@ $(lastword \ ) endef -# Default filter contains current directory $1 and DEFAULT_TIDY_HEADER_DIRS. +# Default filter contains current directory $1 and optional DEFAULT_TIDY_HEADER_DIRS. define default_tidy_header_filter - -header-filter="($(subst $(space),,$1|$(DEFAULT_TIDY_HEADER_DIRS)))" + -header-filter=$(if $(DEFAULT_TIDY_HEADER_DIRS),"($1/|$(DEFAULT_TIDY_HEADER_DIRS))",$1/) endef