From f1f21c7ba216fb9d88466cb29aa09bba57f41d08 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 9 Apr 2024 01:26:37 +0000 Subject: [PATCH] Update src/.clang-format --- src/.clang-format | 3 --- src/cpp/client/call_credentials.cc | 3 +-- src/cpp/client/channel_credentials.cc | 3 +-- src/cpp/common/alarm.cc | 3 +-- src/cpp/ext/csm/csm_observability.cc | 3 +-- src/cpp/ext/csm/csm_observability.h | 4 ++-- src/cpp/ext/csm/metadata_exchange.cc | 3 +-- src/cpp/ext/csm/metadata_exchange.h | 4 ++-- src/cpp/ext/filters/census/client_filter.cc | 3 +-- src/cpp/ext/filters/census/client_filter.h | 3 +-- src/cpp/ext/filters/census/context.cc | 4 ++-- src/cpp/ext/filters/census/context.h | 3 +-- src/cpp/ext/filters/census/grpc_plugin.cc | 3 +-- src/cpp/ext/filters/census/grpc_plugin.h | 3 +-- src/cpp/ext/filters/census/measures.cc | 3 +-- src/cpp/ext/filters/census/measures.h | 4 ++-- src/cpp/ext/filters/census/open_census_call_tracer.h | 3 +-- src/cpp/ext/filters/census/rpc_encoding.cc | 4 ++-- src/cpp/ext/filters/census/rpc_encoding.h | 4 ++-- src/cpp/ext/filters/census/server_call_tracer.cc | 3 +-- src/cpp/ext/filters/census/views.cc | 3 +-- src/cpp/ext/gcp/environment_autodetect.cc | 3 +-- src/cpp/ext/gcp/environment_autodetect.h | 3 +-- src/cpp/ext/gcp/observability.cc | 3 +-- src/cpp/ext/gcp/observability_config.cc | 3 +-- src/cpp/ext/gcp/observability_config.h | 4 ++-- src/cpp/ext/gcp/observability_logging_sink.cc | 3 +-- src/cpp/ext/gcp/observability_logging_sink.h | 3 +-- src/cpp/ext/otel/key_value_iterable.h | 4 ++-- src/cpp/ext/otel/otel_client_call_tracer.cc | 3 +-- src/cpp/ext/otel/otel_client_call_tracer.h | 3 +-- src/cpp/ext/otel/otel_plugin.cc | 3 +-- src/cpp/ext/otel/otel_plugin.h | 3 +-- src/cpp/ext/otel/otel_server_call_tracer.cc | 4 ++-- src/cpp/ext/otel/otel_server_call_tracer.h | 4 ++-- src/cpp/server/admin/admin_services.cc | 1 - src/cpp/server/channelz/channelz_service.cc | 3 +-- src/cpp/server/channelz/channelz_service.h | 1 - src/cpp/server/channelz/channelz_service_plugin.cc | 3 +-- src/cpp/server/csds/csds.cc | 3 +-- src/cpp/server/csds/csds.h | 1 - src/cpp/server/load_reporter/constants.h | 4 ++-- src/cpp/server/load_reporter/get_cpu_stats.h | 4 ++-- src/cpp/server/load_reporter/get_cpu_stats_linux.cc | 4 ++-- src/cpp/server/load_reporter/load_data_store.cc | 3 +-- src/cpp/server/load_reporter/load_data_store.h | 3 +-- src/cpp/server/load_reporter/load_reporter.cc | 3 +-- src/cpp/server/load_reporter/load_reporter.h | 4 ++-- .../server/load_reporter/load_reporter_async_service_impl.cc | 3 +-- .../server/load_reporter/load_reporter_async_service_impl.h | 3 +-- .../load_reporting_service_server_builder_option.cc | 3 +-- .../load_reporting_service_server_builder_plugin.cc | 3 +-- .../load_reporting_service_server_builder_plugin.h | 3 +-- src/cpp/server/load_reporter/util.cc | 3 +-- src/cpp/server/server_credentials.cc | 1 - .../grpcio_observability/grpc_observability/rpc_encoding.cc | 4 ++-- .../grpcio_observability/grpc_observability/rpc_encoding.h | 4 ++-- .../grpc_observability/server_call_tracer.cc | 4 ++-- .../grpc_observability/server_call_tracer.h | 4 ++-- 59 files changed, 72 insertions(+), 115 deletions(-) diff --git a/src/.clang-format b/src/.clang-format index 64387e9e515..5f150ef6edb 100644 --- a/src/.clang-format +++ b/src/.clang-format @@ -5,9 +5,6 @@ DerivePointerAlignment: false PointerAlignment: Left IncludeBlocks: Regroup IncludeCategories: - # port_platform.h is before almost everything - - Regex: '^' - Priority: -100 # ruby.h is even more first if it's included - Regex: '^' Priority: -200 diff --git a/src/cpp/client/call_credentials.cc b/src/cpp/client/call_credentials.cc index 0badb7a7efc..22efb17d62c 100644 --- a/src/cpp/client/call_credentials.cc +++ b/src/cpp/client/call_credentials.cc @@ -11,10 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "absl/strings/str_cat.h" +#include #include #include "src/core/lib/security/credentials/credentials.h" diff --git a/src/cpp/client/channel_credentials.cc b/src/cpp/client/channel_credentials.cc index aa3deffa1d4..321af7783da 100644 --- a/src/cpp/client/channel_credentials.cc +++ b/src/cpp/client/channel_credentials.cc @@ -11,14 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include #include #include #include +#include #include #include diff --git a/src/cpp/common/alarm.cc b/src/cpp/common/alarm.cc index 906b3aa3864..f0e7049024c 100644 --- a/src/cpp/common/alarm.cc +++ b/src/cpp/common/alarm.cc @@ -15,8 +15,6 @@ // // -#include - #include #include #include @@ -27,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/src/cpp/ext/csm/csm_observability.cc b/src/cpp/ext/csm/csm_observability.cc index f400a919229..e89950178ef 100644 --- a/src/cpp/ext/csm/csm_observability.cc +++ b/src/cpp/ext/csm/csm_observability.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/cpp/ext/csm/csm_observability.h" #include @@ -33,6 +31,7 @@ #include "opentelemetry/sdk/resource/resource_detector.h" #include +#include #include #include "src/core/ext/xds/xds_enabled_server.h" diff --git a/src/cpp/ext/csm/csm_observability.h b/src/cpp/ext/csm/csm_observability.h index 1f908138f34..8e623cb4edf 100644 --- a/src/cpp/ext/csm/csm_observability.h +++ b/src/cpp/ext/csm/csm_observability.h @@ -19,10 +19,10 @@ #ifndef GRPC_SRC_CPP_EXT_CSM_CSM_OBSERVABILITY_H #define GRPC_SRC_CPP_EXT_CSM_CSM_OBSERVABILITY_H -#include - #include "absl/strings/string_view.h" +#include + #include "src/core/lib/channel/channel_args.h" namespace grpc { diff --git a/src/cpp/ext/csm/metadata_exchange.cc b/src/cpp/ext/csm/metadata_exchange.cc index 2338499e415..b0990e66358 100644 --- a/src/cpp/ext/csm/metadata_exchange.cc +++ b/src/cpp/ext/csm/metadata_exchange.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/cpp/ext/csm/metadata_exchange.h" #include @@ -38,6 +36,7 @@ #include "upb/base/string_view.h" #include +#include #include "src/core/lib/channel/call_tracer.h" #include "src/core/lib/gprpp/env.h" diff --git a/src/cpp/ext/csm/metadata_exchange.h b/src/cpp/ext/csm/metadata_exchange.h index eac78747f11..4487dcbb74e 100644 --- a/src/cpp/ext/csm/metadata_exchange.h +++ b/src/cpp/ext/csm/metadata_exchange.h @@ -19,8 +19,6 @@ #ifndef GRPC_SRC_CPP_EXT_CSM_METADATA_EXCHANGE_H #define GRPC_SRC_CPP_EXT_CSM_METADATA_EXCHANGE_H -#include - #include #include #include @@ -31,6 +29,8 @@ #include "opentelemetry/sdk/common/attribute_utils.h" #include "upb/mem/arena.hpp" +#include + #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/cpp/ext/otel/otel_plugin.h" diff --git a/src/cpp/ext/filters/census/client_filter.cc b/src/cpp/ext/filters/census/client_filter.cc index 8386c55728f..8dbc0959bd7 100644 --- a/src/cpp/ext/filters/census/client_filter.cc +++ b/src/cpp/ext/filters/census/client_filter.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/cpp/ext/filters/census/client_filter.h" #include @@ -46,6 +44,7 @@ #include #include +#include #include #include #include diff --git a/src/cpp/ext/filters/census/client_filter.h b/src/cpp/ext/filters/census/client_filter.h index 15465507c27..011a22e58a1 100644 --- a/src/cpp/ext/filters/census/client_filter.h +++ b/src/cpp/ext/filters/census/client_filter.h @@ -19,10 +19,9 @@ #ifndef GRPC_SRC_CPP_EXT_FILTERS_CENSUS_CLIENT_FILTER_H #define GRPC_SRC_CPP_EXT_FILTERS_CENSUS_CLIENT_FILTER_H -#include - #include "absl/status/statusor.h" +#include #include #include diff --git a/src/cpp/ext/filters/census/context.cc b/src/cpp/ext/filters/census/context.cc index e2d567fc2a1..21d10f1fd28 100644 --- a/src/cpp/ext/filters/census/context.cc +++ b/src/cpp/ext/filters/census/context.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/cpp/ext/filters/census/context.h" #include @@ -27,6 +25,8 @@ #include "opencensus/trace/context_util.h" #include "opencensus/trace/propagation/grpc_trace_bin.h" +#include + #include "src/core/lib/transport/transport.h" #include "src/cpp/ext/filters/census/grpc_plugin.h" #include "src/cpp/ext/filters/census/rpc_encoding.h" diff --git a/src/cpp/ext/filters/census/context.h b/src/cpp/ext/filters/census/context.h index e1fccf5c802..503823a427e 100644 --- a/src/cpp/ext/filters/census/context.h +++ b/src/cpp/ext/filters/census/context.h @@ -19,8 +19,6 @@ #ifndef GRPC_SRC_CPP_EXT_FILTERS_CENSUS_CONTEXT_H #define GRPC_SRC_CPP_EXT_FILTERS_CENSUS_CONTEXT_H -#include - #include #include @@ -32,6 +30,7 @@ #include #include #include +#include #include #include "src/core/lib/channel/channel_stack.h" diff --git a/src/cpp/ext/filters/census/grpc_plugin.cc b/src/cpp/ext/filters/census/grpc_plugin.cc index f875f374a77..3e345c2f6d8 100644 --- a/src/cpp/ext/filters/census/grpc_plugin.cc +++ b/src/cpp/ext/filters/census/grpc_plugin.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/cpp/ext/filters/census/grpc_plugin.h" #include @@ -27,6 +25,7 @@ #include "opencensus/tags/tag_key.h" #include "opencensus/trace/span.h" +#include #include #include diff --git a/src/cpp/ext/filters/census/grpc_plugin.h b/src/cpp/ext/filters/census/grpc_plugin.h index ad0fd49f7bd..553857c96b7 100644 --- a/src/cpp/ext/filters/census/grpc_plugin.h +++ b/src/cpp/ext/filters/census/grpc_plugin.h @@ -19,8 +19,6 @@ #ifndef GRPC_SRC_CPP_EXT_FILTERS_CENSUS_GRPC_PLUGIN_H #define GRPC_SRC_CPP_EXT_FILTERS_CENSUS_GRPC_PLUGIN_H -#include - #include #include #include @@ -32,6 +30,7 @@ #include "opencensus/tags/tag_key.h" #include "opencensus/tags/tag_map.h" +#include #include namespace grpc { diff --git a/src/cpp/ext/filters/census/measures.cc b/src/cpp/ext/filters/census/measures.cc index 8941d0bd906..5710d04dc6e 100644 --- a/src/cpp/ext/filters/census/measures.cc +++ b/src/cpp/ext/filters/census/measures.cc @@ -16,12 +16,11 @@ // // -#include - #include "src/cpp/ext/filters/census/measures.h" #include "opencensus/stats/stats.h" +#include #include #include "src/cpp/ext/filters/census/grpc_plugin.h" diff --git a/src/cpp/ext/filters/census/measures.h b/src/cpp/ext/filters/census/measures.h index 5d0f39022c5..78a58c6732a 100644 --- a/src/cpp/ext/filters/census/measures.h +++ b/src/cpp/ext/filters/census/measures.h @@ -19,10 +19,10 @@ #ifndef GRPC_SRC_CPP_EXT_FILTERS_CENSUS_MEASURES_H #define GRPC_SRC_CPP_EXT_FILTERS_CENSUS_MEASURES_H -#include - #include "opencensus/stats/stats.h" +#include + namespace grpc { ::opencensus::stats::MeasureInt64 RpcClientSentMessagesPerRpc(); diff --git a/src/cpp/ext/filters/census/open_census_call_tracer.h b/src/cpp/ext/filters/census/open_census_call_tracer.h index 744e44cb2cf..b0eb7e3cae0 100644 --- a/src/cpp/ext/filters/census/open_census_call_tracer.h +++ b/src/cpp/ext/filters/census/open_census_call_tracer.h @@ -19,8 +19,6 @@ #ifndef GRPC_SRC_CPP_EXT_FILTERS_CENSUS_OPEN_CENSUS_CALL_TRACER_H #define GRPC_SRC_CPP_EXT_FILTERS_CENSUS_OPEN_CENSUS_CALL_TRACER_H -#include - #include #include @@ -35,6 +33,7 @@ #include "opencensus/trace/span_id.h" #include "opencensus/trace/trace_id.h" +#include #include #include diff --git a/src/cpp/ext/filters/census/rpc_encoding.cc b/src/cpp/ext/filters/census/rpc_encoding.cc index dff1a39f822..dd6e17a588f 100644 --- a/src/cpp/ext/filters/census/rpc_encoding.cc +++ b/src/cpp/ext/filters/census/rpc_encoding.cc @@ -16,10 +16,10 @@ // // -#include - #include "src/cpp/ext/filters/census/rpc_encoding.h" +#include + namespace grpc { namespace internal { diff --git a/src/cpp/ext/filters/census/rpc_encoding.h b/src/cpp/ext/filters/census/rpc_encoding.h index 23db2fd5c8a..a42b4d8c9e6 100644 --- a/src/cpp/ext/filters/census/rpc_encoding.h +++ b/src/cpp/ext/filters/census/rpc_encoding.h @@ -19,14 +19,14 @@ #ifndef GRPC_SRC_CPP_EXT_FILTERS_CENSUS_RPC_ENCODING_H #define GRPC_SRC_CPP_EXT_FILTERS_CENSUS_RPC_ENCODING_H -#include - #include #include #include "absl/base/internal/endian.h" #include "absl/strings/string_view.h" +#include + namespace grpc { namespace internal { diff --git a/src/cpp/ext/filters/census/server_call_tracer.cc b/src/cpp/ext/filters/census/server_call_tracer.cc index 33534b9a28e..39197015d45 100644 --- a/src/cpp/ext/filters/census/server_call_tracer.cc +++ b/src/cpp/ext/filters/census/server_call_tracer.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/cpp/ext/filters/census/server_call_tracer.h" #include @@ -42,6 +40,7 @@ #include "opencensus/trace/span_id.h" #include "opencensus/trace/trace_id.h" +#include #include #include "src/core/lib/channel/call_tracer.h" diff --git a/src/cpp/ext/filters/census/views.cc b/src/cpp/ext/filters/census/views.cc index 3d3234a8863..068c9089413 100644 --- a/src/cpp/ext/filters/census/views.cc +++ b/src/cpp/ext/filters/census/views.cc @@ -16,13 +16,12 @@ // // -#include - #include #include "absl/time/time.h" #include "opencensus/stats/stats.h" +#include #include #include "src/cpp/ext/filters/census/grpc_plugin.h" diff --git a/src/cpp/ext/gcp/environment_autodetect.cc b/src/cpp/ext/gcp/environment_autodetect.cc index 8a3f1ecc58e..35cbb3a108d 100644 --- a/src/cpp/ext/gcp/environment_autodetect.cc +++ b/src/cpp/ext/gcp/environment_autodetect.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/cpp/ext/gcp/environment_autodetect.h" #include @@ -30,6 +28,7 @@ #include #include +#include #include #include diff --git a/src/cpp/ext/gcp/environment_autodetect.h b/src/cpp/ext/gcp/environment_autodetect.h index dd4738b9a06..fb15ea1d06d 100644 --- a/src/cpp/ext/gcp/environment_autodetect.h +++ b/src/cpp/ext/gcp/environment_autodetect.h @@ -17,8 +17,6 @@ #ifndef GRPC_SRC_CPP_EXT_GCP_ENVIRONMENT_AUTODETECT_H #define GRPC_SRC_CPP_EXT_GCP_ENVIRONMENT_AUTODETECT_H -#include - #include #include #include @@ -29,6 +27,7 @@ #include "absl/status/status.h" #include +#include #include "src/core/lib/gprpp/sync.h" diff --git a/src/cpp/ext/gcp/observability.cc b/src/cpp/ext/gcp/observability.cc index 1cb156d5d49..2c683e20cc8 100644 --- a/src/cpp/ext/gcp/observability.cc +++ b/src/cpp/ext/gcp/observability.cc @@ -14,8 +14,6 @@ // limitations under the License. // -#include - #include #include @@ -41,6 +39,7 @@ #include "opencensus/trace/trace_config.h" #include +#include #include #include #include diff --git a/src/cpp/ext/gcp/observability_config.cc b/src/cpp/ext/gcp/observability_config.cc index fa3ae45651c..2bbac8d4b47 100644 --- a/src/cpp/ext/gcp/observability_config.cc +++ b/src/cpp/ext/gcp/observability_config.cc @@ -14,8 +14,6 @@ // limitations under the License. // -#include - #include "src/cpp/ext/gcp/observability_config.h" #include @@ -32,6 +30,7 @@ #include #include +#include #include "src/core/lib/gprpp/env.h" #include "src/core/lib/gprpp/load_file.h" diff --git a/src/cpp/ext/gcp/observability_config.h b/src/cpp/ext/gcp/observability_config.h index 05d566cf279..97c0b5230fe 100644 --- a/src/cpp/ext/gcp/observability_config.h +++ b/src/cpp/ext/gcp/observability_config.h @@ -17,8 +17,6 @@ #ifndef GRPC_SRC_CPP_EXT_GCP_OBSERVABILITY_CONFIG_H #define GRPC_SRC_CPP_EXT_GCP_OBSERVABILITY_CONFIG_H -#include - #include #include @@ -29,6 +27,8 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" +#include + #include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_args.h" diff --git a/src/cpp/ext/gcp/observability_logging_sink.cc b/src/cpp/ext/gcp/observability_logging_sink.cc index 8d85746e171..6d62c1e4079 100644 --- a/src/cpp/ext/gcp/observability_logging_sink.cc +++ b/src/cpp/ext/gcp/observability_logging_sink.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/cpp/ext/gcp/observability_logging_sink.h" #include @@ -37,6 +35,7 @@ #include #include +#include #include #include #include diff --git a/src/cpp/ext/gcp/observability_logging_sink.h b/src/cpp/ext/gcp/observability_logging_sink.h index 5a405133e44..eea8d6196a7 100644 --- a/src/cpp/ext/gcp/observability_logging_sink.h +++ b/src/cpp/ext/gcp/observability_logging_sink.h @@ -19,8 +19,6 @@ #ifndef GRPC_SRC_CPP_EXT_GCP_OBSERVABILITY_LOGGING_SINK_H #define GRPC_SRC_CPP_EXT_GCP_OBSERVABILITY_LOGGING_SINK_H -#include - #include #include @@ -34,6 +32,7 @@ #include "google/logging/v2/logging.grpc.pb.h" #include +#include #include "src/core/ext/filters/logging/logging_sink.h" #include "src/core/lib/gprpp/sync.h" diff --git a/src/cpp/ext/otel/key_value_iterable.h b/src/cpp/ext/otel/key_value_iterable.h index d515c211483..3488f9c0937 100644 --- a/src/cpp/ext/otel/key_value_iterable.h +++ b/src/cpp/ext/otel/key_value_iterable.h @@ -19,8 +19,6 @@ #ifndef GRPC_SRC_CPP_EXT_OTEL_KEY_VALUE_ITERABLE_H #define GRPC_SRC_CPP_EXT_OTEL_KEY_VALUE_ITERABLE_H -#include - #include #include @@ -33,6 +31,8 @@ #include "opentelemetry/nostd/function_ref.h" #include "opentelemetry/nostd/string_view.h" +#include + #include "src/cpp/ext/otel/otel_plugin.h" namespace grpc { diff --git a/src/cpp/ext/otel/otel_client_call_tracer.cc b/src/cpp/ext/otel/otel_client_call_tracer.cc index 17ab0d816c8..a751f397503 100644 --- a/src/cpp/ext/otel/otel_client_call_tracer.cc +++ b/src/cpp/ext/otel/otel_client_call_tracer.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/cpp/ext/otel/otel_client_call_tracer.h" #include @@ -42,6 +40,7 @@ #include #include +#include #include #include "src/core/client_channel/client_channel_filter.h" diff --git a/src/cpp/ext/otel/otel_client_call_tracer.h b/src/cpp/ext/otel/otel_client_call_tracer.h index 2d9c255c226..827bad9a41f 100644 --- a/src/cpp/ext/otel/otel_client_call_tracer.h +++ b/src/cpp/ext/otel/otel_client_call_tracer.h @@ -19,8 +19,6 @@ #ifndef GRPC_SRC_CPP_EXT_OTEL_OTEL_CLIENT_CALL_TRACER_H #define GRPC_SRC_CPP_EXT_OTEL_OTEL_CLIENT_CALL_TRACER_H -#include - #include #include @@ -31,6 +29,7 @@ #include "absl/strings/string_view.h" #include "absl/time/time.h" +#include #include #include "src/core/lib/channel/call_tracer.h" diff --git a/src/cpp/ext/otel/otel_plugin.cc b/src/cpp/ext/otel/otel_plugin.cc index aac4dd0222c..1c25165428a 100644 --- a/src/cpp/ext/otel/otel_plugin.cc +++ b/src/cpp/ext/otel/otel_plugin.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/cpp/ext/otel/otel_plugin.h" #include @@ -32,6 +30,7 @@ #include "opentelemetry/nostd/variant.h" #include +#include #include #include diff --git a/src/cpp/ext/otel/otel_plugin.h b/src/cpp/ext/otel/otel_plugin.h index 3d1fdd3440e..c2708ef915a 100644 --- a/src/cpp/ext/otel/otel_plugin.h +++ b/src/cpp/ext/otel/otel_plugin.h @@ -19,8 +19,6 @@ #ifndef GRPC_SRC_CPP_EXT_OTEL_OTEL_PLUGIN_H #define GRPC_SRC_CPP_EXT_OTEL_OTEL_PLUGIN_H -#include - #include #include @@ -40,6 +38,7 @@ #include "opentelemetry/metrics/sync_instruments.h" #include "opentelemetry/nostd/shared_ptr.h" +#include #include #include "src/core/lib/channel/channel_args.h" diff --git a/src/cpp/ext/otel/otel_server_call_tracer.cc b/src/cpp/ext/otel/otel_server_call_tracer.cc index c7c04323117..21641f4baa8 100644 --- a/src/cpp/ext/otel/otel_server_call_tracer.cc +++ b/src/cpp/ext/otel/otel_server_call_tracer.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/cpp/ext/otel/otel_server_call_tracer.h" #include @@ -35,6 +33,8 @@ #include "opentelemetry/context/context.h" #include "opentelemetry/metrics/sync_instruments.h" +#include + #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/status_util.h" #include "src/core/lib/channel/tcp_tracer.h" diff --git a/src/cpp/ext/otel/otel_server_call_tracer.h b/src/cpp/ext/otel/otel_server_call_tracer.h index 2c73efdef0e..8ae0f051a03 100644 --- a/src/cpp/ext/otel/otel_server_call_tracer.h +++ b/src/cpp/ext/otel/otel_server_call_tracer.h @@ -19,10 +19,10 @@ #ifndef GRPC_SRC_CPP_EXT_OTEL_OTEL_SERVER_CALL_TRACER_H #define GRPC_SRC_CPP_EXT_OTEL_OTEL_SERVER_CALL_TRACER_H -#include - #include "absl/strings/strip.h" +#include + #include "src/core/lib/channel/call_tracer.h" #include "src/core/lib/channel/channel_args.h" #include "src/cpp/ext/otel/otel_plugin.h" diff --git a/src/cpp/server/admin/admin_services.cc b/src/cpp/server/admin/admin_services.cc index aee9a61d3d9..8a6b279bd91 100644 --- a/src/cpp/server/admin/admin_services.cc +++ b/src/cpp/server/admin/admin_services.cc @@ -17,7 +17,6 @@ // #include - #include #include diff --git a/src/cpp/server/channelz/channelz_service.cc b/src/cpp/server/channelz/channelz_service.cc index 570a656948e..5b9b2ff2553 100644 --- a/src/cpp/server/channelz/channelz_service.cc +++ b/src/cpp/server/channelz/channelz_service.cc @@ -16,13 +16,12 @@ // // -#include - #include "src/cpp/server/channelz/channelz_service.h" #include #include +#include #include // IWYU pragma: no_include "google/protobuf/json/json.h" diff --git a/src/cpp/server/channelz/channelz_service.h b/src/cpp/server/channelz/channelz_service.h index 8f049671f7c..8110320bfad 100644 --- a/src/cpp/server/channelz/channelz_service.h +++ b/src/cpp/server/channelz/channelz_service.h @@ -20,7 +20,6 @@ #define GRPC_SRC_CPP_SERVER_CHANNELZ_CHANNELZ_SERVICE_H #include - #include #include diff --git a/src/cpp/server/channelz/channelz_service_plugin.cc b/src/cpp/server/channelz/channelz_service_plugin.cc index 052a01068af..a3d842ca145 100644 --- a/src/cpp/server/channelz/channelz_service_plugin.cc +++ b/src/cpp/server/channelz/channelz_service_plugin.cc @@ -16,11 +16,10 @@ // // -#include - #include #include +#include #include #include #include diff --git a/src/cpp/server/csds/csds.cc b/src/cpp/server/csds/csds.cc index 7e905b0364c..d82d2b381c6 100644 --- a/src/cpp/server/csds/csds.cc +++ b/src/cpp/server/csds/csds.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/cpp/server/csds/csds.h" #include @@ -27,6 +25,7 @@ #include "absl/status/statusor.h" #include +#include #include #include diff --git a/src/cpp/server/csds/csds.h b/src/cpp/server/csds/csds.h index ede92c236f1..5eb7ac7df96 100644 --- a/src/cpp/server/csds/csds.h +++ b/src/cpp/server/csds/csds.h @@ -20,7 +20,6 @@ #define GRPC_SRC_CPP_SERVER_CSDS_CSDS_H #include - #include #include #include diff --git a/src/cpp/server/load_reporter/constants.h b/src/cpp/server/load_reporter/constants.h index bda477c3ab6..13b29946441 100644 --- a/src/cpp/server/load_reporter/constants.h +++ b/src/cpp/server/load_reporter/constants.h @@ -19,11 +19,11 @@ #ifndef GRPC_SRC_CPP_SERVER_LOAD_REPORTER_CONSTANTS_H #define GRPC_SRC_CPP_SERVER_LOAD_REPORTER_CONSTANTS_H -#include - #include #include +#include + namespace grpc { namespace load_reporter { diff --git a/src/cpp/server/load_reporter/get_cpu_stats.h b/src/cpp/server/load_reporter/get_cpu_stats.h index a19c8625117..76d91ede495 100644 --- a/src/cpp/server/load_reporter/get_cpu_stats.h +++ b/src/cpp/server/load_reporter/get_cpu_stats.h @@ -19,12 +19,12 @@ #ifndef GRPC_SRC_CPP_SERVER_LOAD_REPORTER_GET_CPU_STATS_H #define GRPC_SRC_CPP_SERVER_LOAD_REPORTER_GET_CPU_STATS_H -#include - #include #include +#include + namespace grpc { namespace load_reporter { diff --git a/src/cpp/server/load_reporter/get_cpu_stats_linux.cc b/src/cpp/server/load_reporter/get_cpu_stats_linux.cc index ee2fa144c16..4742481c373 100644 --- a/src/cpp/server/load_reporter/get_cpu_stats_linux.cc +++ b/src/cpp/server/load_reporter/get_cpu_stats_linux.cc @@ -16,10 +16,10 @@ // // -#include - #include +#include + #ifdef GPR_LINUX #include diff --git a/src/cpp/server/load_reporter/load_data_store.cc b/src/cpp/server/load_reporter/load_data_store.cc index 5d475ca84b5..65453bcf166 100644 --- a/src/cpp/server/load_reporter/load_data_store.cc +++ b/src/cpp/server/load_reporter/load_data_store.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/cpp/server/load_reporter/load_data_store.h" #include @@ -29,6 +27,7 @@ #include #include +#include #include "src/core/lib/iomgr/socket_utils.h" #include "src/cpp/server/load_reporter/constants.h" diff --git a/src/cpp/server/load_reporter/load_data_store.h b/src/cpp/server/load_reporter/load_data_store.h index 5ef2aeb6015..efb102c0909 100644 --- a/src/cpp/server/load_reporter/load_data_store.h +++ b/src/cpp/server/load_reporter/load_data_store.h @@ -19,8 +19,6 @@ #ifndef GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_DATA_STORE_H #define GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_DATA_STORE_H -#include - #include #include @@ -30,6 +28,7 @@ #include #include +#include #include namespace grpc { diff --git a/src/cpp/server/load_reporter/load_reporter.cc b/src/cpp/server/load_reporter/load_reporter.cc index e26786e532b..4ce743bcc94 100644 --- a/src/cpp/server/load_reporter/load_reporter.cc +++ b/src/cpp/server/load_reporter/load_reporter.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/cpp/server/load_reporter/load_reporter.h" #include @@ -32,6 +30,7 @@ #include "opencensus/tags/tag_key.h" #include +#include #include "src/cpp/server/load_reporter/constants.h" #include "src/cpp/server/load_reporter/get_cpu_stats.h" diff --git a/src/cpp/server/load_reporter/load_reporter.h b/src/cpp/server/load_reporter/load_reporter.h index 5f79a3c5888..7268d4e3f0d 100644 --- a/src/cpp/server/load_reporter/load_reporter.h +++ b/src/cpp/server/load_reporter/load_reporter.h @@ -19,8 +19,6 @@ #ifndef GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_REPORTER_H #define GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_REPORTER_H -#include - #include #include @@ -38,6 +36,8 @@ #include "opencensus/stats/stats.h" #include "opencensus/tags/tag_key.h" +#include + #include "src/core/lib/gprpp/sync.h" #include "src/cpp/server/load_reporter/load_data_store.h" #include "src/proto/grpc/lb/v1/load_reporter.grpc.pb.h" diff --git a/src/cpp/server/load_reporter/load_reporter_async_service_impl.cc b/src/cpp/server/load_reporter/load_reporter_async_service_impl.cc index 2c19660514c..faf3ed0690e 100644 --- a/src/cpp/server/load_reporter/load_reporter_async_service_impl.cc +++ b/src/cpp/server/load_reporter/load_reporter_async_service_impl.cc @@ -16,14 +16,13 @@ // // -#include - #include "src/cpp/server/load_reporter/load_reporter_async_service_impl.h" #include #include +#include #include #include diff --git a/src/cpp/server/load_reporter/load_reporter_async_service_impl.h b/src/cpp/server/load_reporter/load_reporter_async_service_impl.h index d5a742dbe2a..85676520046 100644 --- a/src/cpp/server/load_reporter/load_reporter_async_service_impl.h +++ b/src/cpp/server/load_reporter/load_reporter_async_service_impl.h @@ -19,8 +19,6 @@ #ifndef GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_REPORTER_ASYNC_SERVICE_IMPL_H #define GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_REPORTER_ASYNC_SERVICE_IMPL_H -#include - #include #include @@ -30,6 +28,7 @@ #include #include +#include #include #include #include diff --git a/src/cpp/server/load_reporter/load_reporting_service_server_builder_option.cc b/src/cpp/server/load_reporter/load_reporting_service_server_builder_option.cc index 30f86b06e05..ec1926beb1a 100644 --- a/src/cpp/server/load_reporter/load_reporting_service_server_builder_option.cc +++ b/src/cpp/server/load_reporter/load_reporting_service_server_builder_option.cc @@ -16,13 +16,12 @@ // // -#include - #include #include #include #include +#include #include #include #include diff --git a/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.cc b/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.cc index 261a404d0ca..766386178ed 100644 --- a/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.cc +++ b/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.cc @@ -16,12 +16,11 @@ // // -#include - #include "src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h" #include +#include #include #include diff --git a/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h b/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h index a94704c3272..c1370ec348e 100644 --- a/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h +++ b/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h @@ -19,11 +19,10 @@ #ifndef GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_REPORTING_SERVICE_SERVER_BUILDER_PLUGIN_H #define GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_REPORTING_SERVICE_SERVER_BUILDER_PLUGIN_H -#include - #include #include +#include #include #include #include diff --git a/src/cpp/server/load_reporter/util.cc b/src/cpp/server/load_reporter/util.cc index 2237d9bce2a..8daac576d73 100644 --- a/src/cpp/server/load_reporter/util.cc +++ b/src/cpp/server/load_reporter/util.cc @@ -16,8 +16,6 @@ // // -#include - #include #include @@ -25,6 +23,7 @@ #include #include +#include #include #include diff --git a/src/cpp/server/server_credentials.cc b/src/cpp/server/server_credentials.cc index 68eece06c26..a3323b9b273 100644 --- a/src/cpp/server/server_credentials.cc +++ b/src/cpp/server/server_credentials.cc @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. #include - #include #include "src/core/lib/gprpp/crash.h" diff --git a/src/python/grpcio_observability/grpc_observability/rpc_encoding.cc b/src/python/grpcio_observability/grpc_observability/rpc_encoding.cc index 53e2c2f1f64..a4da2c05b03 100644 --- a/src/python/grpcio_observability/grpc_observability/rpc_encoding.cc +++ b/src/python/grpcio_observability/grpc_observability/rpc_encoding.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "rpc_encoding.h" +#include + // TODO(xuanwn): Reuse c++ rpc_encoding file. namespace grpc_observability { diff --git a/src/python/grpcio_observability/grpc_observability/rpc_encoding.h b/src/python/grpcio_observability/grpc_observability/rpc_encoding.h index c34f5784cdb..4fd5c94ea46 100644 --- a/src/python/grpcio_observability/grpc_observability/rpc_encoding.h +++ b/src/python/grpcio_observability/grpc_observability/rpc_encoding.h @@ -15,14 +15,14 @@ #ifndef GRPC_PYTHON_OPENCENSUS_RPC_ENCODING_H #define GRPC_PYTHON_OPENCENSUS_RPC_ENCODING_H -#include - #include #include #include "absl/base/internal/endian.h" #include "absl/strings/string_view.h" +#include + namespace grpc_observability { // TODO(xuanwn): Reuse c++ rpc_encoding file. diff --git a/src/python/grpcio_observability/grpc_observability/server_call_tracer.cc b/src/python/grpcio_observability/grpc_observability/server_call_tracer.cc index 6c1e68bfc37..bca4b8abea0 100644 --- a/src/python/grpcio_observability/grpc_observability/server_call_tracer.cc +++ b/src/python/grpcio_observability/grpc_observability/server_call_tracer.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "server_call_tracer.h" #include @@ -35,6 +33,8 @@ #include "observability_util.h" #include "python_census_context.h" +#include + #include "src/core/lib/channel/call_tracer.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/iomgr/error.h" diff --git a/src/python/grpcio_observability/grpc_observability/server_call_tracer.h b/src/python/grpcio_observability/grpc_observability/server_call_tracer.h index 3792ae00f8b..a704a0704a4 100644 --- a/src/python/grpcio_observability/grpc_observability/server_call_tracer.h +++ b/src/python/grpcio_observability/grpc_observability/server_call_tracer.h @@ -15,11 +15,11 @@ #ifndef GRPC_PYTHON_OPENCENSUS_SERVER_CALL_TRACER_H #define GRPC_PYTHON_OPENCENSUS_SERVER_CALL_TRACER_H -#include - #include "absl/strings/string_view.h" #include "absl/strings/strip.h" +#include + #include "src/core/lib/channel/call_tracer.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/slice/slice.h"