diff --git a/source/common/upstream/health_checker_impl.h b/source/common/upstream/health_checker_impl.h index c16a4393df24..33cdff1beef1 100644 --- a/source/common/upstream/health_checker_impl.h +++ b/source/common/upstream/health_checker_impl.h @@ -1,6 +1,7 @@ #pragma once #include "envoy/access_log/access_log.h" +#include "envoy/api/api.h" #include "envoy/api/v2/core/health_check.pb.h" #include "envoy/grpc/status.h" @@ -11,7 +12,6 @@ #include "common/stream_info/stream_info_impl.h" #include "common/upstream/health_checker_base_impl.h" -#include "include/envoy/api/_virtual_includes/api_interface/envoy/api/api.h" #include "src/proto/grpc/health/v1/health.pb.h" namespace Envoy { diff --git a/tools/check_format.py b/tools/check_format.py index ed3b36974963..21bf410ae5fd 100755 --- a/tools/check_format.py +++ b/tools/check_format.py @@ -500,6 +500,9 @@ def checkSourceLine(line, file_path, reportError): if invalid_construct in line: reportError("term %s should be replaced with standard library term %s" % (invalid_construct, valid_construct)) + # Do not include the virtual_includes headers. + if re.search("#include.*/_virtual_includes/", line): + reportError("Don't include the virtual includes headers.") # Some errors cannot be fixed automatically, and actionable, consistent, # navigable messages should be emitted to make it easy to find and fix