diff --git a/tools/run_tests/sanity/cpp_banned_constructs.sh b/tools/run_tests/sanity/cpp_banned_constructs.sh index 55cf252d827..14716f01467 100755 --- a/tools/run_tests/sanity/cpp_banned_constructs.sh +++ b/tools/run_tests/sanity/cpp_banned_constructs.sh @@ -29,3 +29,12 @@ egrep -Irn \ egrep -v include/grpcpp/impl/codegen/sync.h | \ diff - /dev/null +# +# Prevent the include of disallowed C++ headers. +# + +egrep -Irn \ + '^#include (||||||)' \ + include/grpc include/grpcpp src/core src/cpp | \ + egrep -v include/grpcpp/impl/codegen/sync.h | \ + diff - /dev/null