[clang-format] Remove requirement that port_platform.h is at the top (#36276)

Closes #36276

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36276 from ctiller:port_platform-include-grpcpp-clang-format 3242577530
PiperOrigin-RevId: 623302430
pull/36284/head^2
Craig Tiller 8 months ago committed by Copybara-Service
parent 0c742dbbb3
commit 0d2ad09038
  1. 3
      include/grpcpp/.clang-format
  2. 3
      include/grpcpp/create_channel_posix.h
  3. 1
      include/grpcpp/ext/channelz_service_plugin.h
  4. 3
      include/grpcpp/ext/csm_observability.h
  5. 3
      include/grpcpp/ext/gcp_observability.h
  6. 3
      include/grpcpp/ext/otel_plugin.h
  7. 3
      include/grpcpp/ext/server_load_reporting.h
  8. 1
      include/grpcpp/generic/async_generic_service.h
  9. 3
      include/grpcpp/server.h
  10. 3
      include/grpcpp/server_builder.h
  11. 3
      include/grpcpp/server_context.h
  12. 3
      include/grpcpp/server_interface.h
  13. 3
      include/grpcpp/server_posix.h
  14. 1
      include/grpcpp/xds_server_builder.h

@ -5,9 +5,6 @@ DerivePointerAlignment: false
PointerAlignment: Left
IncludeBlocks: Regroup
IncludeCategories:
# port_platform.h is before almost everything
- Regex: '^<grpc/(support|impl/codegen)/port_platform.h>'
Priority: -100
# ruby.h is even more first if it's included
- Regex: '^<ruby/ruby.h>'
Priority: -200

@ -19,10 +19,9 @@
#ifndef GRPCPP_CREATE_CHANNEL_POSIX_H
#define GRPCPP_CREATE_CHANNEL_POSIX_H
#include <grpc/support/port_platform.h>
#include <memory>
#include <grpc/support/port_platform.h>
#include <grpcpp/channel.h>
#include <grpcpp/support/channel_arguments.h>

@ -20,7 +20,6 @@
#define GRPCPP_EXT_CHANNELZ_SERVICE_PLUGIN_H
#include <grpc/support/port_platform.h>
#include <grpcpp/impl/server_builder_plugin.h>
#include <grpcpp/impl/server_initializer.h>
#include <grpcpp/support/config.h>

@ -19,8 +19,6 @@
#ifndef GRPCPP_EXT_CSM_OBSERVABILITY_H
#define GRPCPP_EXT_CSM_OBSERVABILITY_H
#include <grpc/support/port_platform.h>
#include <memory>
#include "absl/functional/any_invocable.h"
@ -28,6 +26,7 @@
#include "absl/strings/string_view.h"
#include "opentelemetry/metrics/meter_provider.h"
#include <grpc/support/port_platform.h>
#include <grpcpp/ext/otel_plugin.h>
namespace grpc {

@ -17,11 +17,10 @@
#ifndef GRPCPP_EXT_GCP_OBSERVABILITY_H
#define GRPCPP_EXT_GCP_OBSERVABILITY_H
#include <grpc/support/port_platform.h>
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include <grpc/support/port_platform.h>
#include <grpcpp/impl/grpc_library.h>
namespace grpc {

@ -19,8 +19,6 @@
#ifndef GRPCPP_EXT_OTEL_PLUGIN_H
#define GRPCPP_EXT_OTEL_PLUGIN_H
#include <grpc/support/port_platform.h>
#include <stddef.h>
#include <stdint.h>
@ -32,6 +30,7 @@
#include "opentelemetry/metrics/meter_provider.h"
#include <grpc/support/metrics.h>
#include <grpc/support/port_platform.h>
namespace grpc {

@ -19,9 +19,8 @@
#ifndef GRPCPP_EXT_SERVER_LOAD_REPORTING_H
#define GRPCPP_EXT_SERVER_LOAD_REPORTING_H
#include <grpc/support/port_platform.h>
#include <grpc/load_reporting.h>
#include <grpc/support/port_platform.h>
#include <grpcpp/impl/server_builder_option.h>
#include <grpcpp/server_context.h>
#include <grpcpp/support/config.h>

@ -20,7 +20,6 @@
#define GRPCPP_GENERIC_ASYNC_GENERIC_SERVICE_H
#include <grpc/support/port_platform.h>
#include <grpcpp/impl/server_callback_handlers.h>
#include <grpcpp/support/async_stream.h>
#include <grpcpp/support/byte_buffer.h>

@ -19,14 +19,13 @@
#ifndef GRPCPP_SERVER_H
#define GRPCPP_SERVER_H
#include <grpc/support/port_platform.h>
#include <list>
#include <memory>
#include <vector>
#include <grpc/compression.h>
#include <grpc/support/atm.h>
#include <grpc/support/port_platform.h>
#include <grpcpp/channel.h>
#include <grpcpp/completion_queue.h>
#include <grpcpp/health_check_service_interface.h>

@ -19,8 +19,6 @@
#ifndef GRPCPP_SERVER_BUILDER_H
#define GRPCPP_SERVER_BUILDER_H
#include <grpc/support/port_platform.h>
#include <climits>
#include <map>
#include <memory>
@ -28,6 +26,7 @@
#include <grpc/compression.h>
#include <grpc/support/cpu.h>
#include <grpc/support/port_platform.h>
#include <grpc/support/workaround_list.h>
#include <grpcpp/impl/channel_argument_option.h>
#include <grpcpp/impl/server_builder_option.h>

@ -19,8 +19,6 @@
#ifndef GRPCPP_SERVER_CONTEXT_H
#define GRPCPP_SERVER_CONTEXT_H
#include <grpc/support/port_platform.h>
#include <atomic>
#include <cassert>
#include <map>
@ -31,6 +29,7 @@
#include <grpc/grpc.h>
#include <grpc/impl/call.h>
#include <grpc/impl/compression_types.h>
#include <grpc/support/port_platform.h>
#include <grpcpp/impl/call.h>
#include <grpcpp/impl/call_op_set.h>
#include <grpcpp/impl/codegen/create_auth_context.h>

@ -19,11 +19,10 @@
#ifndef GRPCPP_SERVER_INTERFACE_H
#define GRPCPP_SERVER_INTERFACE_H
#include <grpc/support/port_platform.h>
#include <grpc/grpc.h>
#include <grpc/impl/grpc_types.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include <grpc/support/time.h>
#include <grpcpp/impl/call.h>
#include <grpcpp/impl/call_hook.h>

@ -19,10 +19,9 @@
#ifndef GRPCPP_SERVER_POSIX_H
#define GRPCPP_SERVER_POSIX_H
#include <grpc/support/port_platform.h>
#include <memory>
#include <grpc/support/port_platform.h>
#include <grpcpp/server.h>
namespace grpc {

@ -20,7 +20,6 @@
#define GRPCPP_XDS_SERVER_BUILDER_H
#include <grpc/support/port_platform.h>
#include <grpcpp/server_builder.h>
namespace grpc {

Loading…
Cancel
Save