From c9151863129459d5879f79fd8d6bea2fb9ef2c2e Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Tue, 15 Jan 2019 02:20:16 +0000 Subject: [PATCH 1/5] ci: enable check for static non-POD Signed-off-by: Lizan Zhou --- .clang-tidy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 0794aa66661f..8386718cd9ee 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,7 +1,7 @@ -Checks: 'clang-diagnostic-*,clang-analyzer-*,abseil-*,bugprone-*,modernize-*,performance-*,readability-redundant-*,readability-braces-around-statements' +Checks: 'clang-diagnostic-*,clang-analyzer-*,abseil-*,bugprone-*,modernize-*,performance-*,readability-redundant-*,readability-braces-around-statements,fuchsia-statically-constructed-objects' #TODO(lizan): grow this list, fix possible warnings and make more checks as error -WarningsAsErrors: 'bugprone-assert-side-effect,modernize-make-shared,modernize-make-unique,readability-redundant-smartptr-get,readability-braces-around-statements,readability-redundant-string-cstr,bugprone-use-after-move' +WarningsAsErrors: 'bugprone-assert-side-effect,modernize-make-shared,modernize-make-unique,readability-redundant-smartptr-get,readability-braces-around-statements,readability-redundant-string-cstr,bugprone-use-after-move,fuchsia-statically-constructed-objects' CheckOptions: - key: bugprone-assert-side-effect.AssertMacros From 679bd49e396561435a01dd73a66ce816895082b8 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Tue, 15 Jan 2019 05:36:02 +0000 Subject: [PATCH 2/5] add NOLINT properly Signed-off-by: Lizan Zhou --- source/extensions/access_loggers/file/config.cc | 2 +- source/extensions/access_loggers/http_grpc/config.cc | 2 +- source/extensions/filters/http/buffer/config.cc | 2 +- source/extensions/filters/http/cors/config.cc | 2 +- source/extensions/filters/http/dynamo/config.cc | 2 +- source/extensions/filters/http/ext_authz/config.cc | 2 +- source/extensions/filters/http/fault/config.cc | 2 +- source/extensions/filters/http/grpc_http1_bridge/config.cc | 2 +- .../filters/http/grpc_http1_reverse_bridge/config.cc | 2 +- source/extensions/filters/http/grpc_json_transcoder/config.cc | 2 +- source/extensions/filters/http/grpc_web/config.cc | 2 +- source/extensions/filters/http/gzip/config.cc | 2 +- source/extensions/filters/http/header_to_metadata/config.cc | 2 +- source/extensions/filters/http/health_check/config.cc | 2 +- source/extensions/filters/http/ip_tagging/config.cc | 2 +- source/extensions/filters/http/jwt_authn/filter_factory.cc | 2 +- source/extensions/filters/http/lua/config.cc | 2 +- source/extensions/filters/http/ratelimit/config.cc | 2 +- source/extensions/filters/http/rbac/config.cc | 2 +- source/extensions/filters/http/router/config.cc | 2 +- source/extensions/filters/http/squash/config.cc | 2 +- .../filters/network/dubbo_proxy/dubbo_protocol_impl.cc | 3 ++- .../filters/network/dubbo_proxy/hessian_deserializer_impl.cc | 2 +- .../filters/network/thrift_proxy/auto_protocol_impl.cc | 3 ++- .../filters/network/thrift_proxy/auto_transport_impl.cc | 3 ++- .../filters/network/thrift_proxy/binary_protocol_impl.cc | 3 ++- .../filters/network/thrift_proxy/compact_protocol_impl.cc | 2 +- .../filters/network/thrift_proxy/filters/ratelimit/config.cc | 2 +- .../filters/network/thrift_proxy/framed_transport_impl.cc | 2 +- .../filters/network/thrift_proxy/header_transport_impl.cc | 2 +- .../extensions/filters/network/thrift_proxy/router/config.cc | 2 +- .../filters/network/thrift_proxy/twitter_protocol_impl.cc | 2 +- .../filters/network/thrift_proxy/unframed_transport_impl.cc | 2 +- source/extensions/retry/host/previous_hosts/config.cc | 2 +- .../extensions/retry/priority/previous_priorities/config.cc | 2 +- source/extensions/stat_sinks/dog_statsd/config.cc | 2 +- source/extensions/stat_sinks/hystrix/config.cc | 2 +- source/extensions/stat_sinks/metrics_service/config.cc | 2 +- source/extensions/stat_sinks/statsd/config.cc | 2 +- source/extensions/tracers/datadog/config.cc | 2 +- source/extensions/tracers/dynamic_ot/config.cc | 2 +- source/extensions/tracers/lightstep/config.cc | 2 +- source/extensions/tracers/zipkin/config.cc | 2 +- test/integration/filters/add_trailers_filter.cc | 2 +- test/integration/filters/headers_only_filter.cc | 4 ++-- test/integration/filters/passthrough_filter.cc | 2 +- test/integration/filters/pause_filter.cc | 2 +- test/integration/filters/random_pause_filter.cc | 2 +- 48 files changed, 53 insertions(+), 49 deletions(-) diff --git a/source/extensions/access_loggers/file/config.cc b/source/extensions/access_loggers/file/config.cc index 9903d8cf8fad..63e251234e69 100644 --- a/source/extensions/access_loggers/file/config.cc +++ b/source/extensions/access_loggers/file/config.cc @@ -71,7 +71,7 @@ FileAccessLogFactory::convertJsonFormatToMap(ProtobufWkt::Struct json_format) { */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace File } // namespace AccessLoggers diff --git a/source/extensions/access_loggers/http_grpc/config.cc b/source/extensions/access_loggers/http_grpc/config.cc index 6de86a264b06..1245a82fcbb4 100644 --- a/source/extensions/access_loggers/http_grpc/config.cc +++ b/source/extensions/access_loggers/http_grpc/config.cc @@ -51,7 +51,7 @@ std::string HttpGrpcAccessLogFactory::name() const { return AccessLogNames::get( */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace HttpGrpc } // namespace AccessLoggers diff --git a/source/extensions/filters/http/buffer/config.cc b/source/extensions/filters/http/buffer/config.cc index 00847c2702d5..30a89535f50e 100644 --- a/source/extensions/filters/http/buffer/config.cc +++ b/source/extensions/filters/http/buffer/config.cc @@ -48,7 +48,7 @@ BufferFilterFactory::createRouteSpecificFilterConfigTyped( */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace BufferFilter } // namespace HttpFilters diff --git a/source/extensions/filters/http/cors/config.cc b/source/extensions/filters/http/cors/config.cc index c9824e5b118f..0b4d774efc6d 100644 --- a/source/extensions/filters/http/cors/config.cc +++ b/source/extensions/filters/http/cors/config.cc @@ -24,7 +24,7 @@ CorsFilterFactory::createFilter(const std::string& stats_prefix, */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Cors } // namespace HttpFilters diff --git a/source/extensions/filters/http/dynamo/config.cc b/source/extensions/filters/http/dynamo/config.cc index 66d17b210a0f..a213019acb9a 100644 --- a/source/extensions/filters/http/dynamo/config.cc +++ b/source/extensions/filters/http/dynamo/config.cc @@ -25,7 +25,7 @@ DynamoFilterConfig::createFilter(const std::string& stat_prefix, */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Dynamo } // namespace HttpFilters diff --git a/source/extensions/filters/http/ext_authz/config.cc b/source/extensions/filters/http/ext_authz/config.cc index 2a427d7e631c..afba21a61d74 100644 --- a/source/extensions/filters/http/ext_authz/config.cc +++ b/source/extensions/filters/http/ext_authz/config.cc @@ -69,7 +69,7 @@ ExtAuthzFilterConfig::createRouteSpecificFilterConfigTyped( */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace ExtAuthz } // namespace HttpFilters diff --git a/source/extensions/filters/http/fault/config.cc b/source/extensions/filters/http/fault/config.cc index adca17fdade8..69c98447fbb6 100644 --- a/source/extensions/filters/http/fault/config.cc +++ b/source/extensions/filters/http/fault/config.cc @@ -43,7 +43,7 @@ FaultFilterFactory::createRouteSpecificFilterConfigTyped( */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Fault } // namespace HttpFilters diff --git a/source/extensions/filters/http/grpc_http1_bridge/config.cc b/source/extensions/filters/http/grpc_http1_bridge/config.cc index d1495949cbfa..d494ef2584b0 100644 --- a/source/extensions/filters/http/grpc_http1_bridge/config.cc +++ b/source/extensions/filters/http/grpc_http1_bridge/config.cc @@ -22,7 +22,7 @@ GrpcHttp1BridgeFilterConfig::createFilter(const std::string&, */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace GrpcHttp1Bridge } // namespace HttpFilters diff --git a/source/extensions/filters/http/grpc_http1_reverse_bridge/config.cc b/source/extensions/filters/http/grpc_http1_reverse_bridge/config.cc index 2ce06c376cce..3278f06fbf9f 100644 --- a/source/extensions/filters/http/grpc_http1_reverse_bridge/config.cc +++ b/source/extensions/filters/http/grpc_http1_reverse_bridge/config.cc @@ -23,7 +23,7 @@ Http::FilterFactoryCb Config::createFilterFactoryFromProtoTyped( * Static registration for the grpc http1 reverse bridge filter. @see RegisterFactory. */ static Envoy::Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace GrpcHttp1ReverseBridge } // namespace HttpFilters } // namespace Extensions diff --git a/source/extensions/filters/http/grpc_json_transcoder/config.cc b/source/extensions/filters/http/grpc_json_transcoder/config.cc index f21587a30b75..ffbfc4e3bb40 100644 --- a/source/extensions/filters/http/grpc_json_transcoder/config.cc +++ b/source/extensions/filters/http/grpc_json_transcoder/config.cc @@ -37,7 +37,7 @@ Http::FilterFactoryCb GrpcJsonTranscoderFilterConfig::createFilterFactory( */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace GrpcJsonTranscoder } // namespace HttpFilters diff --git a/source/extensions/filters/http/grpc_web/config.cc b/source/extensions/filters/http/grpc_web/config.cc index ab0ff64b3a2f..a462d698387f 100644 --- a/source/extensions/filters/http/grpc_web/config.cc +++ b/source/extensions/filters/http/grpc_web/config.cc @@ -21,7 +21,7 @@ Http::FilterFactoryCb GrpcWebFilterConfig::createFilter(const std::string&, */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace GrpcWeb } // namespace HttpFilters diff --git a/source/extensions/filters/http/gzip/config.cc b/source/extensions/filters/http/gzip/config.cc index b518e5181122..138b0626b9e9 100644 --- a/source/extensions/filters/http/gzip/config.cc +++ b/source/extensions/filters/http/gzip/config.cc @@ -25,7 +25,7 @@ Http::FilterFactoryCb GzipFilterFactory::createFilterFactoryFromProtoTyped( */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Gzip } // namespace HttpFilters diff --git a/source/extensions/filters/http/header_to_metadata/config.cc b/source/extensions/filters/http/header_to_metadata/config.cc index 5d68f5ffb306..ca189cbd328b 100644 --- a/source/extensions/filters/http/header_to_metadata/config.cc +++ b/source/extensions/filters/http/header_to_metadata/config.cc @@ -30,7 +30,7 @@ Http::FilterFactoryCb HeaderToMetadataConfig::createFilterFactoryFromProtoTyped( */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace HeaderToMetadataFilter } // namespace HttpFilters diff --git a/source/extensions/filters/http/health_check/config.cc b/source/extensions/filters/http/health_check/config.cc index aa2b594a6f49..09a0cfec775d 100644 --- a/source/extensions/filters/http/health_check/config.cc +++ b/source/extensions/filters/http/health_check/config.cc @@ -69,7 +69,7 @@ HealthCheckFilterConfig::createFilterFactory(const Json::Object& json_config, */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace HealthCheck } // namespace HttpFilters diff --git a/source/extensions/filters/http/ip_tagging/config.cc b/source/extensions/filters/http/ip_tagging/config.cc index 6471bbee3651..905f711ee0d7 100644 --- a/source/extensions/filters/http/ip_tagging/config.cc +++ b/source/extensions/filters/http/ip_tagging/config.cc @@ -29,7 +29,7 @@ Http::FilterFactoryCb IpTaggingFilterFactory::createFilterFactoryFromProtoTyped( */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace IpTagging } // namespace HttpFilters diff --git a/source/extensions/filters/http/jwt_authn/filter_factory.cc b/source/extensions/filters/http/jwt_authn/filter_factory.cc index d63f1253215d..7cc1f176e1e6 100644 --- a/source/extensions/filters/http/jwt_authn/filter_factory.cc +++ b/source/extensions/filters/http/jwt_authn/filter_factory.cc @@ -54,7 +54,7 @@ FilterFactory::createFilterFactoryFromProtoTyped(const JwtAuthentication& proto_ * Static registration for this jwt_authn filter. @see RegisterFactory. */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace JwtAuthn } // namespace HttpFilters diff --git a/source/extensions/filters/http/lua/config.cc b/source/extensions/filters/http/lua/config.cc index 72af10b860bc..f3cafca70885 100644 --- a/source/extensions/filters/http/lua/config.cc +++ b/source/extensions/filters/http/lua/config.cc @@ -36,7 +36,7 @@ LuaFilterConfig::createFilterFactory(const Json::Object& json_config, */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Lua } // namespace HttpFilters diff --git a/source/extensions/filters/http/ratelimit/config.cc b/source/extensions/filters/http/ratelimit/config.cc index 06d26c5d8a34..3ff1e1f9367f 100644 --- a/source/extensions/filters/http/ratelimit/config.cc +++ b/source/extensions/filters/http/ratelimit/config.cc @@ -57,7 +57,7 @@ RateLimitFilterConfig::createFilterFactory(const Json::Object& json_config, */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace RateLimitFilter } // namespace HttpFilters diff --git a/source/extensions/filters/http/rbac/config.cc b/source/extensions/filters/http/rbac/config.cc index 1f55d38ded63..958be80416f7 100644 --- a/source/extensions/filters/http/rbac/config.cc +++ b/source/extensions/filters/http/rbac/config.cc @@ -33,7 +33,7 @@ RoleBasedAccessControlFilterConfigFactory::createRouteSpecificFilterConfigTyped( */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace RBACFilter } // namespace HttpFilters diff --git a/source/extensions/filters/http/router/config.cc b/source/extensions/filters/http/router/config.cc index eb3569b31ea5..11b9d968ce6a 100644 --- a/source/extensions/filters/http/router/config.cc +++ b/source/extensions/filters/http/router/config.cc @@ -39,7 +39,7 @@ RouterFilterConfig::createFilterFactory(const Json::Object& json_config, */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace RouterFilter } // namespace HttpFilters diff --git a/source/extensions/filters/http/squash/config.cc b/source/extensions/filters/http/squash/config.cc index 71d3bc73bc15..3f86fc87d557 100644 --- a/source/extensions/filters/http/squash/config.cc +++ b/source/extensions/filters/http/squash/config.cc @@ -43,7 +43,7 @@ Http::FilterFactoryCb SquashFilterConfigFactory::createFilterFactoryFromProtoTyp */ static Envoy::Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Squash } // namespace HttpFilters diff --git a/source/extensions/filters/network/dubbo_proxy/dubbo_protocol_impl.cc b/source/extensions/filters/network/dubbo_proxy/dubbo_protocol_impl.cc index 74f646b1133c..dcaceb5d5058 100644 --- a/source/extensions/filters/network/dubbo_proxy/dubbo_protocol_impl.cc +++ b/source/extensions/filters/network/dubbo_proxy/dubbo_protocol_impl.cc @@ -123,7 +123,8 @@ class DubboProtocolConfigFactory : public ProtocolFactoryBase /** * Static registration for the Dubbo protocol. @see RegisterFactory. */ -static Registry::RegisterFactory register_; +static Registry::RegisterFactory + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace DubboProxy } // namespace NetworkFilters diff --git a/source/extensions/filters/network/dubbo_proxy/hessian_deserializer_impl.cc b/source/extensions/filters/network/dubbo_proxy/hessian_deserializer_impl.cc index 91faf510704a..61d98d5749d2 100644 --- a/source/extensions/filters/network/dubbo_proxy/hessian_deserializer_impl.cc +++ b/source/extensions/filters/network/dubbo_proxy/hessian_deserializer_impl.cc @@ -94,7 +94,7 @@ class HessianDeserializerConfigFactory : public DeserializerFactoryBase - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace DubboProxy } // namespace NetworkFilters diff --git a/source/extensions/filters/network/thrift_proxy/auto_protocol_impl.cc b/source/extensions/filters/network/thrift_proxy/auto_protocol_impl.cc index ea654c92d4e7..88644df1536b 100644 --- a/source/extensions/filters/network/thrift_proxy/auto_protocol_impl.cc +++ b/source/extensions/filters/network/thrift_proxy/auto_protocol_impl.cc @@ -84,7 +84,8 @@ class AutoProtocolConfigFactory : public ProtocolFactoryBase { /** * Static registration for the auto protocol. @see RegisterFactory. */ -static Registry::RegisterFactory register_; +static Registry::RegisterFactory + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace ThriftProxy } // namespace NetworkFilters diff --git a/source/extensions/filters/network/thrift_proxy/auto_transport_impl.cc b/source/extensions/filters/network/thrift_proxy/auto_transport_impl.cc index 34b2abd378fc..d9625ffb69e1 100644 --- a/source/extensions/filters/network/thrift_proxy/auto_transport_impl.cc +++ b/source/extensions/filters/network/thrift_proxy/auto_transport_impl.cc @@ -82,7 +82,8 @@ class AutoTransportConfigFactory : public TransportFactoryBase register_; +static Registry::RegisterFactory + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace ThriftProxy } // namespace NetworkFilters diff --git a/source/extensions/filters/network/thrift_proxy/binary_protocol_impl.cc b/source/extensions/filters/network/thrift_proxy/binary_protocol_impl.cc index fb8accc4a98b..32f501377f1b 100644 --- a/source/extensions/filters/network/thrift_proxy/binary_protocol_impl.cc +++ b/source/extensions/filters/network/thrift_proxy/binary_protocol_impl.cc @@ -408,7 +408,8 @@ class BinaryProtocolConfigFactory : public ProtocolFactoryBase register_; +static Registry::RegisterFactory + register_; // NOLINT(fuchsia-statically-constructed-objects) class LaxBinaryProtocolConfigFactory : public ProtocolFactoryBase { public: diff --git a/source/extensions/filters/network/thrift_proxy/compact_protocol_impl.cc b/source/extensions/filters/network/thrift_proxy/compact_protocol_impl.cc index b6cd3f05d3b7..28c4992940ab 100644 --- a/source/extensions/filters/network/thrift_proxy/compact_protocol_impl.cc +++ b/source/extensions/filters/network/thrift_proxy/compact_protocol_impl.cc @@ -626,7 +626,7 @@ class CompactProtocolConfigFactory : public ProtocolFactoryBase - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace ThriftProxy } // namespace NetworkFilters diff --git a/source/extensions/filters/network/thrift_proxy/filters/ratelimit/config.cc b/source/extensions/filters/network/thrift_proxy/filters/ratelimit/config.cc index b98a593d7b1c..76d396ed5655 100644 --- a/source/extensions/filters/network/thrift_proxy/filters/ratelimit/config.cc +++ b/source/extensions/filters/network/thrift_proxy/filters/ratelimit/config.cc @@ -50,7 +50,7 @@ RateLimitFilterConfig::createFilterFactoryFromProtoTyped( */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace RateLimitFilter } // namespace ThriftFilters diff --git a/source/extensions/filters/network/thrift_proxy/framed_transport_impl.cc b/source/extensions/filters/network/thrift_proxy/framed_transport_impl.cc index 8395c4f4e388..875341e95753 100644 --- a/source/extensions/filters/network/thrift_proxy/framed_transport_impl.cc +++ b/source/extensions/filters/network/thrift_proxy/framed_transport_impl.cc @@ -54,7 +54,7 @@ class FramedTransportConfigFactory : public TransportFactoryBase - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace ThriftProxy } // namespace NetworkFilters diff --git a/source/extensions/filters/network/thrift_proxy/header_transport_impl.cc b/source/extensions/filters/network/thrift_proxy/header_transport_impl.cc index 36001652a2f9..a19110c91fda 100644 --- a/source/extensions/filters/network/thrift_proxy/header_transport_impl.cc +++ b/source/extensions/filters/network/thrift_proxy/header_transport_impl.cc @@ -313,7 +313,7 @@ class HeaderTransportConfigFactory : public TransportFactoryBase - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace ThriftProxy } // namespace NetworkFilters diff --git a/source/extensions/filters/network/thrift_proxy/router/config.cc b/source/extensions/filters/network/thrift_proxy/router/config.cc index 92ef5d40cc11..0ac3d1ae5fb7 100644 --- a/source/extensions/filters/network/thrift_proxy/router/config.cc +++ b/source/extensions/filters/network/thrift_proxy/router/config.cc @@ -25,7 +25,7 @@ ThriftFilters::FilterFactoryCb RouterFilterConfig::createFilterFactoryFromProtoT * Static registration for the router filter. @see RegisterFactory. */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Router } // namespace ThriftProxy diff --git a/source/extensions/filters/network/thrift_proxy/twitter_protocol_impl.cc b/source/extensions/filters/network/thrift_proxy/twitter_protocol_impl.cc index f35bd95a3b58..8d348525e317 100644 --- a/source/extensions/filters/network/thrift_proxy/twitter_protocol_impl.cc +++ b/source/extensions/filters/network/thrift_proxy/twitter_protocol_impl.cc @@ -1159,7 +1159,7 @@ class TwitterProtocolConfigFactory : public ProtocolFactoryBase - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace ThriftProxy } // namespace NetworkFilters diff --git a/source/extensions/filters/network/thrift_proxy/unframed_transport_impl.cc b/source/extensions/filters/network/thrift_proxy/unframed_transport_impl.cc index d3a2744540c9..80d581c16b41 100644 --- a/source/extensions/filters/network/thrift_proxy/unframed_transport_impl.cc +++ b/source/extensions/filters/network/thrift_proxy/unframed_transport_impl.cc @@ -14,7 +14,7 @@ class UnframedTransportConfigFactory : public TransportFactoryBase - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace ThriftProxy } // namespace NetworkFilters diff --git a/source/extensions/retry/host/previous_hosts/config.cc b/source/extensions/retry/host/previous_hosts/config.cc index bc6d3ac18dc4..fbcad948b38d 100644 --- a/source/extensions/retry/host/previous_hosts/config.cc +++ b/source/extensions/retry/host/previous_hosts/config.cc @@ -10,7 +10,7 @@ namespace Host { static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } } // namespace Retry } // namespace Extensions diff --git a/source/extensions/retry/priority/previous_priorities/config.cc b/source/extensions/retry/priority/previous_priorities/config.cc index 43032ade9d0b..60a31b1e4556 100644 --- a/source/extensions/retry/priority/previous_priorities/config.cc +++ b/source/extensions/retry/priority/previous_priorities/config.cc @@ -21,7 +21,7 @@ PreviousPrioritiesRetryPriorityFactory::createRetryPriority(const Protobuf::Mess static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Priority } // namespace Retry diff --git a/source/extensions/stat_sinks/dog_statsd/config.cc b/source/extensions/stat_sinks/dog_statsd/config.cc index 75e7313a6066..171f3fe1bc4c 100644 --- a/source/extensions/stat_sinks/dog_statsd/config.cc +++ b/source/extensions/stat_sinks/dog_statsd/config.cc @@ -37,7 +37,7 @@ std::string DogStatsdSinkFactory::name() { return StatsSinkNames::get().DogStats * Static registration for the this sink factory. @see RegisterFactory. */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace DogStatsd } // namespace StatSinks diff --git a/source/extensions/stat_sinks/hystrix/config.cc b/source/extensions/stat_sinks/hystrix/config.cc index 0f6dec0d145b..70d3e27d1c4d 100644 --- a/source/extensions/stat_sinks/hystrix/config.cc +++ b/source/extensions/stat_sinks/hystrix/config.cc @@ -33,7 +33,7 @@ std::string HystrixSinkFactory::name() { return StatsSinkNames::get().Hystrix; } * Static registration for the statsd sink factory. @see RegisterFactory. */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Hystrix } // namespace StatSinks diff --git a/source/extensions/stat_sinks/metrics_service/config.cc b/source/extensions/stat_sinks/metrics_service/config.cc index c2e3745ab134..657993591541 100644 --- a/source/extensions/stat_sinks/metrics_service/config.cc +++ b/source/extensions/stat_sinks/metrics_service/config.cc @@ -43,7 +43,7 @@ std::string MetricsServiceSinkFactory::name() { return StatsSinkNames::get().Met * Static registration for the this sink factory. @see RegisterFactory. */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace MetricsService } // namespace StatSinks diff --git a/source/extensions/stat_sinks/statsd/config.cc b/source/extensions/stat_sinks/statsd/config.cc index 283d7e88e6be..109f2d3f2509 100644 --- a/source/extensions/stat_sinks/statsd/config.cc +++ b/source/extensions/stat_sinks/statsd/config.cc @@ -50,7 +50,7 @@ std::string StatsdSinkFactory::name() { return StatsSinkNames::get().Statsd; } * Static registration for the statsd sink factory. @see RegisterFactory. */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Statsd } // namespace StatSinks diff --git a/source/extensions/tracers/datadog/config.cc b/source/extensions/tracers/datadog/config.cc index fd1effd86168..e9cc23f44fdb 100644 --- a/source/extensions/tracers/datadog/config.cc +++ b/source/extensions/tracers/datadog/config.cc @@ -29,7 +29,7 @@ Tracing::HttpTracerPtr DatadogTracerFactory::createHttpTracerTyped( * Static registration for the Datadog tracer. @see RegisterFactory. */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Datadog } // namespace Tracers diff --git a/source/extensions/tracers/dynamic_ot/config.cc b/source/extensions/tracers/dynamic_ot/config.cc index 6053b4c84b51..5e1f64751459 100644 --- a/source/extensions/tracers/dynamic_ot/config.cc +++ b/source/extensions/tracers/dynamic_ot/config.cc @@ -30,7 +30,7 @@ Tracing::HttpTracerPtr DynamicOpenTracingTracerFactory::createHttpTracerTyped( */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace DynamicOt } // namespace Tracers diff --git a/source/extensions/tracers/lightstep/config.cc b/source/extensions/tracers/lightstep/config.cc index 9754017800f4..c4036d4f08fc 100644 --- a/source/extensions/tracers/lightstep/config.cc +++ b/source/extensions/tracers/lightstep/config.cc @@ -35,7 +35,7 @@ Tracing::HttpTracerPtr LightstepTracerFactory::createHttpTracerTyped( * Static registration for the lightstep tracer. @see RegisterFactory. */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Lightstep } // namespace Tracers diff --git a/source/extensions/tracers/zipkin/config.cc b/source/extensions/tracers/zipkin/config.cc index 86b53bbd763c..14e60a9f0085 100644 --- a/source/extensions/tracers/zipkin/config.cc +++ b/source/extensions/tracers/zipkin/config.cc @@ -28,7 +28,7 @@ Tracing::HttpTracerPtr ZipkinTracerFactory::createHttpTracerTyped( * Static registration for the lightstep tracer. @see RegisterFactory. */ static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Zipkin } // namespace Tracers diff --git a/test/integration/filters/add_trailers_filter.cc b/test/integration/filters/add_trailers_filter.cc index dd6c0f0fa0d2..65765b79b7a8 100644 --- a/test/integration/filters/add_trailers_filter.cc +++ b/test/integration/filters/add_trailers_filter.cc @@ -44,6 +44,6 @@ class AddTrailersStreamFilterConfig // perform static registration static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Envoy diff --git a/test/integration/filters/headers_only_filter.cc b/test/integration/filters/headers_only_filter.cc index 0006dd2fb338..242cea3496c7 100644 --- a/test/integration/filters/headers_only_filter.cc +++ b/test/integration/filters/headers_only_filter.cc @@ -23,7 +23,7 @@ class HeaderOnlyDecoderFilter : public Http::PassThroughFilter { constexpr char HeaderOnlyDecoderFilter::name[]; static Registry::RegisterFactory, Server::Configuration::NamedHttpFilterConfigFactory> - decoder_register_; + decoder_register_; // NOLINT(fuchsia-statically-constructed-objects) class HeaderOnlyEncoderFilter : public Http::PassThroughFilter { public: @@ -38,5 +38,5 @@ constexpr char HeaderOnlyEncoderFilter::name[]; static Registry::RegisterFactory, Server::Configuration::NamedHttpFilterConfigFactory> - encoder_register_; + encoder_register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Envoy diff --git a/test/integration/filters/passthrough_filter.cc b/test/integration/filters/passthrough_filter.cc index bd89e806d651..c8101c978b2e 100644 --- a/test/integration/filters/passthrough_filter.cc +++ b/test/integration/filters/passthrough_filter.cc @@ -17,6 +17,6 @@ class TestPassThroughFilter : public Http::PassThroughFilter { constexpr char TestPassThroughFilter::name[]; static Registry::RegisterFactory, Server::Configuration::NamedHttpFilterConfigFactory> - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Envoy diff --git a/test/integration/filters/pause_filter.cc b/test/integration/filters/pause_filter.cc index 228dce27f725..fef578171549 100644 --- a/test/integration/filters/pause_filter.cc +++ b/test/integration/filters/pause_filter.cc @@ -80,6 +80,6 @@ class TestPauseFilterConfig : public Extensions::HttpFilters::Common::EmptyHttpF // perform static registration static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Envoy diff --git a/test/integration/filters/random_pause_filter.cc b/test/integration/filters/random_pause_filter.cc index 15f3f71e160e..ca10dcaa37be 100644 --- a/test/integration/filters/random_pause_filter.cc +++ b/test/integration/filters/random_pause_filter.cc @@ -67,6 +67,6 @@ class RandomPauseFilterConfig : public Extensions::HttpFilters::Common::EmptyHtt // perform static registration static Registry::RegisterFactory - register_; + register_; // NOLINT(fuchsia-statically-constructed-objects) } // namespace Envoy From 57d1c4773c1ba028f1b877152e6b0d87b0343674 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Tue, 15 Jan 2019 08:52:59 +0000 Subject: [PATCH 3/5] NOLINTNEXTLINE Signed-off-by: Lizan Zhou --- source/common/grpc/google_grpc_creds_impl.cc | 1 + source/common/network/resolver_impl.cc | 1 + source/extensions/access_loggers/file/config.cc | 3 ++- source/extensions/access_loggers/http_grpc/config.cc | 3 ++- source/extensions/filters/http/buffer/config.cc | 3 ++- source/extensions/filters/http/cors/config.cc | 3 ++- source/extensions/filters/http/dynamo/config.cc | 3 ++- source/extensions/filters/http/ext_authz/config.cc | 3 ++- source/extensions/filters/http/fault/config.cc | 3 ++- source/extensions/filters/http/grpc_http1_bridge/config.cc | 3 ++- .../filters/http/grpc_http1_reverse_bridge/config.cc | 2 +- .../extensions/filters/http/grpc_json_transcoder/config.cc | 3 ++- source/extensions/filters/http/grpc_web/config.cc | 3 ++- source/extensions/filters/http/gzip/config.cc | 3 ++- source/extensions/filters/http/header_to_metadata/config.cc | 3 ++- source/extensions/filters/http/health_check/config.cc | 3 ++- source/extensions/filters/http/ip_tagging/config.cc | 3 ++- source/extensions/filters/http/jwt_authn/filter_factory.cc | 3 ++- source/extensions/filters/http/lua/config.cc | 3 ++- source/extensions/filters/http/ratelimit/config.cc | 3 ++- source/extensions/filters/http/rbac/config.cc | 3 ++- source/extensions/filters/http/router/config.cc | 3 ++- source/extensions/filters/http/squash/config.cc | 2 +- source/extensions/filters/listener/original_dst/config.cc | 1 + .../listener/original_src/original_src_config_factory.cc | 1 + source/extensions/filters/listener/proxy_protocol/config.cc | 1 + source/extensions/filters/listener/tls_inspector/config.cc | 1 + source/extensions/filters/network/client_ssl_auth/config.cc | 1 + source/extensions/filters/network/dubbo_proxy/config.cc | 1 + .../filters/network/dubbo_proxy/dubbo_protocol_impl.cc | 4 ++-- .../network/dubbo_proxy/hessian_deserializer_impl.cc | 3 ++- source/extensions/filters/network/echo/config.cc | 1 + source/extensions/filters/network/ext_authz/config.cc | 1 + .../filters/network/http_connection_manager/config.cc | 1 + source/extensions/filters/network/mongo_proxy/config.cc | 1 + source/extensions/filters/network/ratelimit/config.cc | 1 + source/extensions/filters/network/rbac/config.cc | 1 + source/extensions/filters/network/redis_proxy/config.cc | 1 + source/extensions/filters/network/sni_cluster/config.cc | 1 + source/extensions/filters/network/tcp_proxy/config.cc | 1 + .../filters/network/thrift_proxy/auto_protocol_impl.cc | 4 ++-- .../filters/network/thrift_proxy/auto_transport_impl.cc | 4 ++-- .../filters/network/thrift_proxy/binary_protocol_impl.cc | 5 +++-- .../filters/network/thrift_proxy/compact_protocol_impl.cc | 3 ++- source/extensions/filters/network/thrift_proxy/config.cc | 1 + .../network/thrift_proxy/filters/ratelimit/config.cc | 3 ++- .../filters/network/thrift_proxy/framed_transport_impl.cc | 3 ++- .../filters/network/thrift_proxy/header_transport_impl.cc | 3 ++- .../filters/network/thrift_proxy/router/config.cc | 3 ++- .../filters/network/thrift_proxy/twitter_protocol_impl.cc | 3 ++- .../filters/network/thrift_proxy/unframed_transport_impl.cc | 3 ++- source/extensions/grpc_credentials/example/config.cc | 1 + .../grpc_credentials/file_based_metadata/config.cc | 1 + source/extensions/health_checkers/redis/config.cc | 1 + source/extensions/resource_monitors/fixed_heap/config.cc | 1 + .../resource_monitors/injected_resource/config.cc | 1 + source/extensions/retry/host/previous_hosts/config.cc | 5 +++-- .../extensions/retry/priority/previous_priorities/config.cc | 3 ++- source/extensions/stat_sinks/dog_statsd/config.cc | 3 ++- source/extensions/stat_sinks/hystrix/config.cc | 3 ++- source/extensions/stat_sinks/metrics_service/config.cc | 3 ++- source/extensions/stat_sinks/statsd/config.cc | 3 ++- source/extensions/tracers/datadog/config.cc | 3 ++- source/extensions/tracers/dynamic_ot/config.cc | 3 ++- source/extensions/tracers/lightstep/config.cc | 3 ++- source/extensions/tracers/zipkin/config.cc | 3 ++- source/extensions/transport_sockets/alts/config.cc | 2 ++ source/extensions/transport_sockets/capture/config.cc | 2 ++ source/extensions/transport_sockets/raw_buffer/config.cc | 2 ++ source/extensions/transport_sockets/ssl/config.cc | 2 ++ test/common/singleton/manager_impl_test.cc | 1 + test/integration/filters/add_trailers_filter.cc | 3 ++- test/integration/filters/headers_only_filter.cc | 6 ++++-- test/integration/filters/passthrough_filter.cc | 3 ++- test/integration/filters/pause_filter.cc | 3 ++- test/integration/filters/random_pause_filter.cc | 3 ++- 76 files changed, 130 insertions(+), 54 deletions(-) diff --git a/source/common/grpc/google_grpc_creds_impl.cc b/source/common/grpc/google_grpc_creds_impl.cc index ab3a1ab9486d..87c71edc2ad4 100644 --- a/source/common/grpc/google_grpc_creds_impl.cc +++ b/source/common/grpc/google_grpc_creds_impl.cc @@ -122,6 +122,7 @@ class DefaultGoogleGrpcCredentialsFactory : public GoogleGrpcCredentialsFactory /** * Static registration for the default Google gRPC credentials factory. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory default_google_grpc_credentials_registered_; diff --git a/source/common/network/resolver_impl.cc b/source/common/network/resolver_impl.cc index 1bad0215fae2..6847f5d17f60 100644 --- a/source/common/network/resolver_impl.cc +++ b/source/common/network/resolver_impl.cc @@ -41,6 +41,7 @@ class IpResolver : public Resolver { /** * Static registration for the IP resolver. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory ip_registered_; InstanceConstSharedPtr resolveProtoAddress(const envoy::api::v2::core::Address& address) { diff --git a/source/extensions/access_loggers/file/config.cc b/source/extensions/access_loggers/file/config.cc index 63e251234e69..f1766674f5e9 100644 --- a/source/extensions/access_loggers/file/config.cc +++ b/source/extensions/access_loggers/file/config.cc @@ -69,9 +69,10 @@ FileAccessLogFactory::convertJsonFormatToMap(ProtobufWkt::Struct json_format) { /** * Static registration for the file access log. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace File } // namespace AccessLoggers diff --git a/source/extensions/access_loggers/http_grpc/config.cc b/source/extensions/access_loggers/http_grpc/config.cc index 1245a82fcbb4..b85a191a0f35 100644 --- a/source/extensions/access_loggers/http_grpc/config.cc +++ b/source/extensions/access_loggers/http_grpc/config.cc @@ -49,9 +49,10 @@ std::string HttpGrpcAccessLogFactory::name() const { return AccessLogNames::get( /** * Static registration for the HTTP gRPC access log. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace HttpGrpc } // namespace AccessLoggers diff --git a/source/extensions/filters/http/buffer/config.cc b/source/extensions/filters/http/buffer/config.cc index 30a89535f50e..29d226c7c15c 100644 --- a/source/extensions/filters/http/buffer/config.cc +++ b/source/extensions/filters/http/buffer/config.cc @@ -46,9 +46,10 @@ BufferFilterFactory::createRouteSpecificFilterConfigTyped( /** * Static registration for the buffer filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace BufferFilter } // namespace HttpFilters diff --git a/source/extensions/filters/http/cors/config.cc b/source/extensions/filters/http/cors/config.cc index 0b4d774efc6d..144c6cf33151 100644 --- a/source/extensions/filters/http/cors/config.cc +++ b/source/extensions/filters/http/cors/config.cc @@ -22,9 +22,10 @@ CorsFilterFactory::createFilter(const std::string& stats_prefix, /** * Static registration for the cors filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace Cors } // namespace HttpFilters diff --git a/source/extensions/filters/http/dynamo/config.cc b/source/extensions/filters/http/dynamo/config.cc index a213019acb9a..13ec922c752a 100644 --- a/source/extensions/filters/http/dynamo/config.cc +++ b/source/extensions/filters/http/dynamo/config.cc @@ -23,9 +23,10 @@ DynamoFilterConfig::createFilter(const std::string& stat_prefix, /** * Static registration for the http dynamodb filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace Dynamo } // namespace HttpFilters diff --git a/source/extensions/filters/http/ext_authz/config.cc b/source/extensions/filters/http/ext_authz/config.cc index afba21a61d74..e03ff9890344 100644 --- a/source/extensions/filters/http/ext_authz/config.cc +++ b/source/extensions/filters/http/ext_authz/config.cc @@ -67,9 +67,10 @@ ExtAuthzFilterConfig::createRouteSpecificFilterConfigTyped( /** * Static registration for the external authorization filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace ExtAuthz } // namespace HttpFilters diff --git a/source/extensions/filters/http/fault/config.cc b/source/extensions/filters/http/fault/config.cc index 69c98447fbb6..7fdca6009a15 100644 --- a/source/extensions/filters/http/fault/config.cc +++ b/source/extensions/filters/http/fault/config.cc @@ -41,9 +41,10 @@ FaultFilterFactory::createRouteSpecificFilterConfigTyped( /** * Static registration for the fault filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace Fault } // namespace HttpFilters diff --git a/source/extensions/filters/http/grpc_http1_bridge/config.cc b/source/extensions/filters/http/grpc_http1_bridge/config.cc index d494ef2584b0..0af7eb1840c1 100644 --- a/source/extensions/filters/http/grpc_http1_bridge/config.cc +++ b/source/extensions/filters/http/grpc_http1_bridge/config.cc @@ -20,9 +20,10 @@ GrpcHttp1BridgeFilterConfig::createFilter(const std::string&, /** * Static registration for the grpc HTTP1 bridge filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace GrpcHttp1Bridge } // namespace HttpFilters diff --git a/source/extensions/filters/http/grpc_http1_reverse_bridge/config.cc b/source/extensions/filters/http/grpc_http1_reverse_bridge/config.cc index 3278f06fbf9f..2ce06c376cce 100644 --- a/source/extensions/filters/http/grpc_http1_reverse_bridge/config.cc +++ b/source/extensions/filters/http/grpc_http1_reverse_bridge/config.cc @@ -23,7 +23,7 @@ Http::FilterFactoryCb Config::createFilterFactoryFromProtoTyped( * Static registration for the grpc http1 reverse bridge filter. @see RegisterFactory. */ static Envoy::Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace GrpcHttp1ReverseBridge } // namespace HttpFilters } // namespace Extensions diff --git a/source/extensions/filters/http/grpc_json_transcoder/config.cc b/source/extensions/filters/http/grpc_json_transcoder/config.cc index ffbfc4e3bb40..13256c93c7d0 100644 --- a/source/extensions/filters/http/grpc_json_transcoder/config.cc +++ b/source/extensions/filters/http/grpc_json_transcoder/config.cc @@ -35,9 +35,10 @@ Http::FilterFactoryCb GrpcJsonTranscoderFilterConfig::createFilterFactory( /** * Static registration for the grpc transcoding filter. @see RegisterNamedHttpFilterConfigFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace GrpcJsonTranscoder } // namespace HttpFilters diff --git a/source/extensions/filters/http/grpc_web/config.cc b/source/extensions/filters/http/grpc_web/config.cc index a462d698387f..029a7d80d1b9 100644 --- a/source/extensions/filters/http/grpc_web/config.cc +++ b/source/extensions/filters/http/grpc_web/config.cc @@ -19,9 +19,10 @@ Http::FilterFactoryCb GrpcWebFilterConfig::createFilter(const std::string&, /** * Static registration for the gRPC-Web filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace GrpcWeb } // namespace HttpFilters diff --git a/source/extensions/filters/http/gzip/config.cc b/source/extensions/filters/http/gzip/config.cc index 138b0626b9e9..edcb49a09ce8 100644 --- a/source/extensions/filters/http/gzip/config.cc +++ b/source/extensions/filters/http/gzip/config.cc @@ -23,9 +23,10 @@ Http::FilterFactoryCb GzipFilterFactory::createFilterFactoryFromProtoTyped( /** * Static registration for the gzip filter. @see NamedHttpFilterConfigFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace Gzip } // namespace HttpFilters diff --git a/source/extensions/filters/http/header_to_metadata/config.cc b/source/extensions/filters/http/header_to_metadata/config.cc index ca189cbd328b..7663d8a2f150 100644 --- a/source/extensions/filters/http/header_to_metadata/config.cc +++ b/source/extensions/filters/http/header_to_metadata/config.cc @@ -28,9 +28,10 @@ Http::FilterFactoryCb HeaderToMetadataConfig::createFilterFactoryFromProtoTyped( /** * Static registration for the header-to-metadata filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace HeaderToMetadataFilter } // namespace HttpFilters diff --git a/source/extensions/filters/http/health_check/config.cc b/source/extensions/filters/http/health_check/config.cc index 09a0cfec775d..a4b2c63548cd 100644 --- a/source/extensions/filters/http/health_check/config.cc +++ b/source/extensions/filters/http/health_check/config.cc @@ -67,9 +67,10 @@ HealthCheckFilterConfig::createFilterFactory(const Json::Object& json_config, /** * Static registration for the health check filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace HealthCheck } // namespace HttpFilters diff --git a/source/extensions/filters/http/ip_tagging/config.cc b/source/extensions/filters/http/ip_tagging/config.cc index 905f711ee0d7..a52da36d709c 100644 --- a/source/extensions/filters/http/ip_tagging/config.cc +++ b/source/extensions/filters/http/ip_tagging/config.cc @@ -27,9 +27,10 @@ Http::FilterFactoryCb IpTaggingFilterFactory::createFilterFactoryFromProtoTyped( /** * Static registration for the ip tagging filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace IpTagging } // namespace HttpFilters diff --git a/source/extensions/filters/http/jwt_authn/filter_factory.cc b/source/extensions/filters/http/jwt_authn/filter_factory.cc index 7cc1f176e1e6..812b8a68725e 100644 --- a/source/extensions/filters/http/jwt_authn/filter_factory.cc +++ b/source/extensions/filters/http/jwt_authn/filter_factory.cc @@ -53,8 +53,9 @@ FilterFactory::createFilterFactoryFromProtoTyped(const JwtAuthentication& proto_ /** * Static registration for this jwt_authn filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace JwtAuthn } // namespace HttpFilters diff --git a/source/extensions/filters/http/lua/config.cc b/source/extensions/filters/http/lua/config.cc index f3cafca70885..2c565887a555 100644 --- a/source/extensions/filters/http/lua/config.cc +++ b/source/extensions/filters/http/lua/config.cc @@ -34,9 +34,10 @@ LuaFilterConfig::createFilterFactory(const Json::Object& json_config, /** * Static registration for the Lua filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace Lua } // namespace HttpFilters diff --git a/source/extensions/filters/http/ratelimit/config.cc b/source/extensions/filters/http/ratelimit/config.cc index 3ff1e1f9367f..df7e4b4b2ddf 100644 --- a/source/extensions/filters/http/ratelimit/config.cc +++ b/source/extensions/filters/http/ratelimit/config.cc @@ -55,9 +55,10 @@ RateLimitFilterConfig::createFilterFactory(const Json::Object& json_config, /** * Static registration for the rate limit filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace RateLimitFilter } // namespace HttpFilters diff --git a/source/extensions/filters/http/rbac/config.cc b/source/extensions/filters/http/rbac/config.cc index 958be80416f7..749ba23ea69b 100644 --- a/source/extensions/filters/http/rbac/config.cc +++ b/source/extensions/filters/http/rbac/config.cc @@ -31,9 +31,10 @@ RoleBasedAccessControlFilterConfigFactory::createRouteSpecificFilterConfigTyped( /** * Static registration for the RBAC filter. @see RegisterFactory */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace RBACFilter } // namespace HttpFilters diff --git a/source/extensions/filters/http/router/config.cc b/source/extensions/filters/http/router/config.cc index 11b9d968ce6a..3684ae1e2999 100644 --- a/source/extensions/filters/http/router/config.cc +++ b/source/extensions/filters/http/router/config.cc @@ -37,9 +37,10 @@ RouterFilterConfig::createFilterFactory(const Json::Object& json_config, /** * Static registration for the router filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace RouterFilter } // namespace HttpFilters diff --git a/source/extensions/filters/http/squash/config.cc b/source/extensions/filters/http/squash/config.cc index 3f86fc87d557..71d3bc73bc15 100644 --- a/source/extensions/filters/http/squash/config.cc +++ b/source/extensions/filters/http/squash/config.cc @@ -43,7 +43,7 @@ Http::FilterFactoryCb SquashFilterConfigFactory::createFilterFactoryFromProtoTyp */ static Envoy::Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace Squash } // namespace HttpFilters diff --git a/source/extensions/filters/listener/original_dst/config.cc b/source/extensions/filters/listener/original_dst/config.cc index 63e858ee463f..29c5dcb6406b 100644 --- a/source/extensions/filters/listener/original_dst/config.cc +++ b/source/extensions/filters/listener/original_dst/config.cc @@ -35,6 +35,7 @@ class OriginalDstConfigFactory : public Server::Configuration::NamedListenerFilt /** * Static registration for the original dst filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/filters/listener/original_src/original_src_config_factory.cc b/source/extensions/filters/listener/original_src/original_src_config_factory.cc index 15b8502a5465..615613744ac8 100644 --- a/source/extensions/filters/listener/original_src/original_src_config_factory.cc +++ b/source/extensions/filters/listener/original_src/original_src_config_factory.cc @@ -29,6 +29,7 @@ ProtobufTypes::MessagePtr OriginalSrcConfigFactory::createEmptyConfigProto() { /** * Static registration for the original_src filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/filters/listener/proxy_protocol/config.cc b/source/extensions/filters/listener/proxy_protocol/config.cc index 6cbe967666e0..c63bdf5097f1 100644 --- a/source/extensions/filters/listener/proxy_protocol/config.cc +++ b/source/extensions/filters/listener/proxy_protocol/config.cc @@ -34,6 +34,7 @@ class ProxyProtocolConfigFactory : public Server::Configuration::NamedListenerFi /** * Static registration for the proxy protocol filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/filters/listener/tls_inspector/config.cc b/source/extensions/filters/listener/tls_inspector/config.cc index af8f8170683c..3e51e6f7410a 100644 --- a/source/extensions/filters/listener/tls_inspector/config.cc +++ b/source/extensions/filters/listener/tls_inspector/config.cc @@ -36,6 +36,7 @@ class TlsInspectorConfigFactory : public Server::Configuration::NamedListenerFil /** * Static registration for the TLS inspector filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/filters/network/client_ssl_auth/config.cc b/source/extensions/filters/network/client_ssl_auth/config.cc index 91572d215e90..d0b6bba97687 100644 --- a/source/extensions/filters/network/client_ssl_auth/config.cc +++ b/source/extensions/filters/network/client_ssl_auth/config.cc @@ -37,6 +37,7 @@ Network::FilterFactoryCb ClientSslAuthConfigFactory::createFilterFactoryFromProt /** * Static registration for the client SSL auth filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/filters/network/dubbo_proxy/config.cc b/source/extensions/filters/network/dubbo_proxy/config.cc index 01bf22ed8923..c2ef480430b2 100644 --- a/source/extensions/filters/network/dubbo_proxy/config.cc +++ b/source/extensions/filters/network/dubbo_proxy/config.cc @@ -26,6 +26,7 @@ Network::FilterFactoryCb DubboProxyFilterConfigFactory::createFilterFactoryFromP /** * Static registration for the dubbo filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/filters/network/dubbo_proxy/dubbo_protocol_impl.cc b/source/extensions/filters/network/dubbo_proxy/dubbo_protocol_impl.cc index dcaceb5d5058..11ce73234cda 100644 --- a/source/extensions/filters/network/dubbo_proxy/dubbo_protocol_impl.cc +++ b/source/extensions/filters/network/dubbo_proxy/dubbo_protocol_impl.cc @@ -123,8 +123,8 @@ class DubboProtocolConfigFactory : public ProtocolFactoryBase /** * Static registration for the Dubbo protocol. @see RegisterFactory. */ -static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) +static Registry::RegisterFactory register_; } // namespace DubboProxy } // namespace NetworkFilters diff --git a/source/extensions/filters/network/dubbo_proxy/hessian_deserializer_impl.cc b/source/extensions/filters/network/dubbo_proxy/hessian_deserializer_impl.cc index 61d98d5749d2..5dfb3e247154 100644 --- a/source/extensions/filters/network/dubbo_proxy/hessian_deserializer_impl.cc +++ b/source/extensions/filters/network/dubbo_proxy/hessian_deserializer_impl.cc @@ -93,8 +93,9 @@ class HessianDeserializerConfigFactory : public DeserializerFactoryBase - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace DubboProxy } // namespace NetworkFilters diff --git a/source/extensions/filters/network/echo/config.cc b/source/extensions/filters/network/echo/config.cc index 990a3bf5ac01..5f37bd9d598d 100644 --- a/source/extensions/filters/network/echo/config.cc +++ b/source/extensions/filters/network/echo/config.cc @@ -40,6 +40,7 @@ class EchoConfigFactory : public Server::Configuration::NamedNetworkFilterConfig /** * Static registration for the echo filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/filters/network/ext_authz/config.cc b/source/extensions/filters/network/ext_authz/config.cc index cab5ea49c1ca..805bc7ea892e 100644 --- a/source/extensions/filters/network/ext_authz/config.cc +++ b/source/extensions/filters/network/ext_authz/config.cc @@ -40,6 +40,7 @@ Network::FilterFactoryCb ExtAuthzConfigFactory::createFilterFactoryFromProtoType /** * Static registration for the external authorization filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/filters/network/http_connection_manager/config.cc b/source/extensions/filters/network/http_connection_manager/config.cc index f9faf22d2ccf..351fc7aaf8ce 100644 --- a/source/extensions/filters/network/http_connection_manager/config.cc +++ b/source/extensions/filters/network/http_connection_manager/config.cc @@ -114,6 +114,7 @@ Network::FilterFactoryCb HttpConnectionManagerFilterConfigFactory::createFilterF /** * Static registration for the HTTP connection manager filter. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/filters/network/mongo_proxy/config.cc b/source/extensions/filters/network/mongo_proxy/config.cc index 3a61ade91f0f..2eb243179a99 100644 --- a/source/extensions/filters/network/mongo_proxy/config.cc +++ b/source/extensions/filters/network/mongo_proxy/config.cc @@ -55,6 +55,7 @@ MongoProxyFilterConfigFactory::createFilterFactory(const Json::Object& json_conf /** * Static registration for the mongo filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/filters/network/ratelimit/config.cc b/source/extensions/filters/network/ratelimit/config.cc index 7657e80c3f96..a17249d9d4a8 100644 --- a/source/extensions/filters/network/ratelimit/config.cc +++ b/source/extensions/filters/network/ratelimit/config.cc @@ -58,6 +58,7 @@ RateLimitConfigFactory::createFilterFactory(const Json::Object& json_config, /** * Static registration for the rate limit filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/filters/network/rbac/config.cc b/source/extensions/filters/network/rbac/config.cc index 7e00874fd0d0..9da9af2824c3 100644 --- a/source/extensions/filters/network/rbac/config.cc +++ b/source/extensions/filters/network/rbac/config.cc @@ -85,6 +85,7 @@ RoleBasedAccessControlNetworkFilterConfigFactory::createFilterFactoryFromProtoTy /** * Static registration for the RBAC network filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/filters/network/redis_proxy/config.cc b/source/extensions/filters/network/redis_proxy/config.cc index 2555f66dc478..e30b404d2cb2 100644 --- a/source/extensions/filters/network/redis_proxy/config.cc +++ b/source/extensions/filters/network/redis_proxy/config.cc @@ -51,6 +51,7 @@ RedisProxyFilterConfigFactory::createFilterFactory(const Json::Object& json_conf /** * Static registration for the redis filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/filters/network/sni_cluster/config.cc b/source/extensions/filters/network/sni_cluster/config.cc index 8d7b6eba067a..44fbaad8070c 100644 --- a/source/extensions/filters/network/sni_cluster/config.cc +++ b/source/extensions/filters/network/sni_cluster/config.cc @@ -31,6 +31,7 @@ ProtobufTypes::MessagePtr SniClusterNetworkFilterConfigFactory::createEmptyConfi /** * Static registration for the sni_cluster filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/filters/network/tcp_proxy/config.cc b/source/extensions/filters/network/tcp_proxy/config.cc index 1f56af99f4d5..248377f041ab 100644 --- a/source/extensions/filters/network/tcp_proxy/config.cc +++ b/source/extensions/filters/network/tcp_proxy/config.cc @@ -37,6 +37,7 @@ Network::FilterFactoryCb ConfigFactory::createFilterFactoryFromProtoTyped( /** * Static registration for the tcp_proxy filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/filters/network/thrift_proxy/auto_protocol_impl.cc b/source/extensions/filters/network/thrift_proxy/auto_protocol_impl.cc index 88644df1536b..0e628a8158c1 100644 --- a/source/extensions/filters/network/thrift_proxy/auto_protocol_impl.cc +++ b/source/extensions/filters/network/thrift_proxy/auto_protocol_impl.cc @@ -84,8 +84,8 @@ class AutoProtocolConfigFactory : public ProtocolFactoryBase { /** * Static registration for the auto protocol. @see RegisterFactory. */ -static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) +static Registry::RegisterFactory register_; } // namespace ThriftProxy } // namespace NetworkFilters diff --git a/source/extensions/filters/network/thrift_proxy/auto_transport_impl.cc b/source/extensions/filters/network/thrift_proxy/auto_transport_impl.cc index d9625ffb69e1..f9ed2d3c10d9 100644 --- a/source/extensions/filters/network/thrift_proxy/auto_transport_impl.cc +++ b/source/extensions/filters/network/thrift_proxy/auto_transport_impl.cc @@ -82,8 +82,8 @@ class AutoTransportConfigFactory : public TransportFactoryBase - register_; // NOLINT(fuchsia-statically-constructed-objects) +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) +static Registry::RegisterFactory register_; } // namespace ThriftProxy } // namespace NetworkFilters diff --git a/source/extensions/filters/network/thrift_proxy/binary_protocol_impl.cc b/source/extensions/filters/network/thrift_proxy/binary_protocol_impl.cc index 32f501377f1b..fae2d77a8510 100644 --- a/source/extensions/filters/network/thrift_proxy/binary_protocol_impl.cc +++ b/source/extensions/filters/network/thrift_proxy/binary_protocol_impl.cc @@ -408,8 +408,8 @@ class BinaryProtocolConfigFactory : public ProtocolFactoryBase - register_; // NOLINT(fuchsia-statically-constructed-objects) +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) +static Registry::RegisterFactory register_; class LaxBinaryProtocolConfigFactory : public ProtocolFactoryBase { public: @@ -419,6 +419,7 @@ class LaxBinaryProtocolConfigFactory : public ProtocolFactoryBase register_lax_; diff --git a/source/extensions/filters/network/thrift_proxy/compact_protocol_impl.cc b/source/extensions/filters/network/thrift_proxy/compact_protocol_impl.cc index 28c4992940ab..8ed26f8830b2 100644 --- a/source/extensions/filters/network/thrift_proxy/compact_protocol_impl.cc +++ b/source/extensions/filters/network/thrift_proxy/compact_protocol_impl.cc @@ -625,8 +625,9 @@ class CompactProtocolConfigFactory : public ProtocolFactoryBase - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace ThriftProxy } // namespace NetworkFilters diff --git a/source/extensions/filters/network/thrift_proxy/config.cc b/source/extensions/filters/network/thrift_proxy/config.cc index c3f5a71c2228..a01cdf6c31d9 100644 --- a/source/extensions/filters/network/thrift_proxy/config.cc +++ b/source/extensions/filters/network/thrift_proxy/config.cc @@ -116,6 +116,7 @@ Network::FilterFactoryCb ThriftProxyFilterConfigFactory::createFilterFactoryFrom /** * Static registration for the thrift filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/filters/network/thrift_proxy/filters/ratelimit/config.cc b/source/extensions/filters/network/thrift_proxy/filters/ratelimit/config.cc index 76d396ed5655..f58e45b1f921 100644 --- a/source/extensions/filters/network/thrift_proxy/filters/ratelimit/config.cc +++ b/source/extensions/filters/network/thrift_proxy/filters/ratelimit/config.cc @@ -48,9 +48,10 @@ RateLimitFilterConfig::createFilterFactoryFromProtoTyped( /** * Static registration for the rate limit filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace RateLimitFilter } // namespace ThriftFilters diff --git a/source/extensions/filters/network/thrift_proxy/framed_transport_impl.cc b/source/extensions/filters/network/thrift_proxy/framed_transport_impl.cc index 875341e95753..bc75014f0239 100644 --- a/source/extensions/filters/network/thrift_proxy/framed_transport_impl.cc +++ b/source/extensions/filters/network/thrift_proxy/framed_transport_impl.cc @@ -53,8 +53,9 @@ class FramedTransportConfigFactory : public TransportFactoryBase - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace ThriftProxy } // namespace NetworkFilters diff --git a/source/extensions/filters/network/thrift_proxy/header_transport_impl.cc b/source/extensions/filters/network/thrift_proxy/header_transport_impl.cc index a19110c91fda..8c858a647e78 100644 --- a/source/extensions/filters/network/thrift_proxy/header_transport_impl.cc +++ b/source/extensions/filters/network/thrift_proxy/header_transport_impl.cc @@ -312,8 +312,9 @@ class HeaderTransportConfigFactory : public TransportFactoryBase - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace ThriftProxy } // namespace NetworkFilters diff --git a/source/extensions/filters/network/thrift_proxy/router/config.cc b/source/extensions/filters/network/thrift_proxy/router/config.cc index 0ac3d1ae5fb7..0431bb211efa 100644 --- a/source/extensions/filters/network/thrift_proxy/router/config.cc +++ b/source/extensions/filters/network/thrift_proxy/router/config.cc @@ -24,8 +24,9 @@ ThriftFilters::FilterFactoryCb RouterFilterConfig::createFilterFactoryFromProtoT /** * Static registration for the router filter. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace Router } // namespace ThriftProxy diff --git a/source/extensions/filters/network/thrift_proxy/twitter_protocol_impl.cc b/source/extensions/filters/network/thrift_proxy/twitter_protocol_impl.cc index 8d348525e317..a675759b2e35 100644 --- a/source/extensions/filters/network/thrift_proxy/twitter_protocol_impl.cc +++ b/source/extensions/filters/network/thrift_proxy/twitter_protocol_impl.cc @@ -1158,8 +1158,9 @@ class TwitterProtocolConfigFactory : public ProtocolFactoryBase - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace ThriftProxy } // namespace NetworkFilters diff --git a/source/extensions/filters/network/thrift_proxy/unframed_transport_impl.cc b/source/extensions/filters/network/thrift_proxy/unframed_transport_impl.cc index 80d581c16b41..6896800cf53f 100644 --- a/source/extensions/filters/network/thrift_proxy/unframed_transport_impl.cc +++ b/source/extensions/filters/network/thrift_proxy/unframed_transport_impl.cc @@ -13,8 +13,9 @@ class UnframedTransportConfigFactory : public TransportFactoryBase - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace ThriftProxy } // namespace NetworkFilters diff --git a/source/extensions/grpc_credentials/example/config.cc b/source/extensions/grpc_credentials/example/config.cc index 4e5ef7f2eb35..1f93dd92f5c6 100644 --- a/source/extensions/grpc_credentials/example/config.cc +++ b/source/extensions/grpc_credentials/example/config.cc @@ -57,6 +57,7 @@ StaticHeaderAuthenticator::GetMetadata(grpc::string_ref, grpc::string_ref, const /** * Static registration for the static header Google gRPC credentials factory. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory access_token_google_grpc_credentials_registered_; diff --git a/source/extensions/grpc_credentials/file_based_metadata/config.cc b/source/extensions/grpc_credentials/file_based_metadata/config.cc index 951f11c6c6ee..d9e17fd568df 100644 --- a/source/extensions/grpc_credentials/file_based_metadata/config.cc +++ b/source/extensions/grpc_credentials/file_based_metadata/config.cc @@ -72,6 +72,7 @@ FileBasedMetadataAuthenticator::GetMetadata(grpc::string_ref, grpc::string_ref, * Static registration for the file based metadata Google gRPC credentials factory. @see * RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory file_based_metadata_google_grpc_credentials_registered_; diff --git a/source/extensions/health_checkers/redis/config.cc b/source/extensions/health_checkers/redis/config.cc index 922e91940b5a..4111b099d7b9 100644 --- a/source/extensions/health_checkers/redis/config.cc +++ b/source/extensions/health_checkers/redis/config.cc @@ -23,6 +23,7 @@ Upstream::HealthCheckerSharedPtr RedisHealthCheckerFactory::createCustomHealthCh /** * Static registration for the redis custom health checker. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/resource_monitors/fixed_heap/config.cc b/source/extensions/resource_monitors/fixed_heap/config.cc index d0313789ff01..f9c9ea92a8fc 100644 --- a/source/extensions/resource_monitors/fixed_heap/config.cc +++ b/source/extensions/resource_monitors/fixed_heap/config.cc @@ -20,6 +20,7 @@ Server::ResourceMonitorPtr FixedHeapMonitorFactory::createResourceMonitorFromPro /** * Static registration for the fixed heap resource monitor factory. @see RegistryFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/resource_monitors/injected_resource/config.cc b/source/extensions/resource_monitors/injected_resource/config.cc index 2a4cc274cfec..20f3abf18d5e 100644 --- a/source/extensions/resource_monitors/injected_resource/config.cc +++ b/source/extensions/resource_monitors/injected_resource/config.cc @@ -21,6 +21,7 @@ Server::ResourceMonitorPtr InjectedResourceMonitorFactory::createResourceMonitor /** * Static registration for the injected resource monitor factory. @see RegistryFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory registered_; diff --git a/source/extensions/retry/host/previous_hosts/config.cc b/source/extensions/retry/host/previous_hosts/config.cc index fbcad948b38d..a9920927f968 100644 --- a/source/extensions/retry/host/previous_hosts/config.cc +++ b/source/extensions/retry/host/previous_hosts/config.cc @@ -8,10 +8,11 @@ namespace Extensions { namespace Retry { namespace Host { +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) -} + register_; +} // namespace Host } // namespace Retry } // namespace Extensions } // namespace Envoy diff --git a/source/extensions/retry/priority/previous_priorities/config.cc b/source/extensions/retry/priority/previous_priorities/config.cc index 60a31b1e4556..1800b9efd86f 100644 --- a/source/extensions/retry/priority/previous_priorities/config.cc +++ b/source/extensions/retry/priority/previous_priorities/config.cc @@ -19,9 +19,10 @@ PreviousPrioritiesRetryPriorityFactory::createRetryPriority(const Protobuf::Mess max_retries); } +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace Priority } // namespace Retry diff --git a/source/extensions/stat_sinks/dog_statsd/config.cc b/source/extensions/stat_sinks/dog_statsd/config.cc index 171f3fe1bc4c..a0982c8177a9 100644 --- a/source/extensions/stat_sinks/dog_statsd/config.cc +++ b/source/extensions/stat_sinks/dog_statsd/config.cc @@ -36,8 +36,9 @@ std::string DogStatsdSinkFactory::name() { return StatsSinkNames::get().DogStats /** * Static registration for the this sink factory. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace DogStatsd } // namespace StatSinks diff --git a/source/extensions/stat_sinks/hystrix/config.cc b/source/extensions/stat_sinks/hystrix/config.cc index 70d3e27d1c4d..0231e786013a 100644 --- a/source/extensions/stat_sinks/hystrix/config.cc +++ b/source/extensions/stat_sinks/hystrix/config.cc @@ -32,8 +32,9 @@ std::string HystrixSinkFactory::name() { return StatsSinkNames::get().Hystrix; } /** * Static registration for the statsd sink factory. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace Hystrix } // namespace StatSinks diff --git a/source/extensions/stat_sinks/metrics_service/config.cc b/source/extensions/stat_sinks/metrics_service/config.cc index 657993591541..3595108e2cea 100644 --- a/source/extensions/stat_sinks/metrics_service/config.cc +++ b/source/extensions/stat_sinks/metrics_service/config.cc @@ -42,8 +42,9 @@ std::string MetricsServiceSinkFactory::name() { return StatsSinkNames::get().Met /** * Static registration for the this sink factory. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace MetricsService } // namespace StatSinks diff --git a/source/extensions/stat_sinks/statsd/config.cc b/source/extensions/stat_sinks/statsd/config.cc index 109f2d3f2509..b3e2712d35f7 100644 --- a/source/extensions/stat_sinks/statsd/config.cc +++ b/source/extensions/stat_sinks/statsd/config.cc @@ -49,8 +49,9 @@ std::string StatsdSinkFactory::name() { return StatsSinkNames::get().Statsd; } /** * Static registration for the statsd sink factory. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace Statsd } // namespace StatSinks diff --git a/source/extensions/tracers/datadog/config.cc b/source/extensions/tracers/datadog/config.cc index e9cc23f44fdb..76317e7c176f 100644 --- a/source/extensions/tracers/datadog/config.cc +++ b/source/extensions/tracers/datadog/config.cc @@ -28,8 +28,9 @@ Tracing::HttpTracerPtr DatadogTracerFactory::createHttpTracerTyped( /** * Static registration for the Datadog tracer. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace Datadog } // namespace Tracers diff --git a/source/extensions/tracers/dynamic_ot/config.cc b/source/extensions/tracers/dynamic_ot/config.cc index 5e1f64751459..057bc7d7ed17 100644 --- a/source/extensions/tracers/dynamic_ot/config.cc +++ b/source/extensions/tracers/dynamic_ot/config.cc @@ -28,9 +28,10 @@ Tracing::HttpTracerPtr DynamicOpenTracingTracerFactory::createHttpTracerTyped( /** * Static registration for the dynamic opentracing tracer. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace DynamicOt } // namespace Tracers diff --git a/source/extensions/tracers/lightstep/config.cc b/source/extensions/tracers/lightstep/config.cc index c4036d4f08fc..9784273aef24 100644 --- a/source/extensions/tracers/lightstep/config.cc +++ b/source/extensions/tracers/lightstep/config.cc @@ -34,8 +34,9 @@ Tracing::HttpTracerPtr LightstepTracerFactory::createHttpTracerTyped( /** * Static registration for the lightstep tracer. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace Lightstep } // namespace Tracers diff --git a/source/extensions/tracers/zipkin/config.cc b/source/extensions/tracers/zipkin/config.cc index 14e60a9f0085..cec8c575b314 100644 --- a/source/extensions/tracers/zipkin/config.cc +++ b/source/extensions/tracers/zipkin/config.cc @@ -27,8 +27,9 @@ Tracing::HttpTracerPtr ZipkinTracerFactory::createHttpTracerTyped( /** * Static registration for the lightstep tracer. @see RegisterFactory. */ +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace Zipkin } // namespace Tracers diff --git a/source/extensions/transport_sockets/alts/config.cc b/source/extensions/transport_sockets/alts/config.cc index c128562ee59b..a698290eb64d 100644 --- a/source/extensions/transport_sockets/alts/config.cc +++ b/source/extensions/transport_sockets/alts/config.cc @@ -119,10 +119,12 @@ DownstreamAltsTransportSocketConfigFactory::createTransportSocketFactory( return createTransportSocketFactoryHelper(message, /* is_upstream */ false); } +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory upstream_registered_; +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory downstream_registered_; diff --git a/source/extensions/transport_sockets/capture/config.cc b/source/extensions/transport_sockets/capture/config.cc index 1e251ba6f069..47fb3f8fd2d6 100644 --- a/source/extensions/transport_sockets/capture/config.cc +++ b/source/extensions/transport_sockets/capture/config.cc @@ -53,10 +53,12 @@ ProtobufTypes::MessagePtr CaptureSocketConfigFactory::createEmptyConfigProto() { return std::make_unique(); } +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory upstream_registered_; +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory downstream_registered_; diff --git a/source/extensions/transport_sockets/raw_buffer/config.cc b/source/extensions/transport_sockets/raw_buffer/config.cc index 45d0c3276863..7c6e39385202 100644 --- a/source/extensions/transport_sockets/raw_buffer/config.cc +++ b/source/extensions/transport_sockets/raw_buffer/config.cc @@ -24,10 +24,12 @@ ProtobufTypes::MessagePtr RawBufferSocketFactory::createEmptyConfigProto() { return std::make_unique(); } +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory upstream_registered_; +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory downstream_registered_; diff --git a/source/extensions/transport_sockets/ssl/config.cc b/source/extensions/transport_sockets/ssl/config.cc index d211d8607586..fdbfbb72a0ad 100644 --- a/source/extensions/transport_sockets/ssl/config.cc +++ b/source/extensions/transport_sockets/ssl/config.cc @@ -27,6 +27,7 @@ ProtobufTypes::MessagePtr UpstreamSslSocketFactory::createEmptyConfigProto() { return std::make_unique(); } +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory upstream_registered_; @@ -45,6 +46,7 @@ ProtobufTypes::MessagePtr DownstreamSslSocketFactory::createEmptyConfigProto() { return std::make_unique(); } +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory downstream_registered_; diff --git a/test/common/singleton/manager_impl_test.cc b/test/common/singleton/manager_impl_test.cc index 238ff8479cbd..7731ae9f032f 100644 --- a/test/common/singleton/manager_impl_test.cc +++ b/test/common/singleton/manager_impl_test.cc @@ -22,6 +22,7 @@ TEST(SingletonManagerImplDeathTest, NotRegistered) { } static constexpr char test_singleton_name[] = "test_singleton"; +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory, Singleton::Registration> test_singleton_registered_; diff --git a/test/integration/filters/add_trailers_filter.cc b/test/integration/filters/add_trailers_filter.cc index 65765b79b7a8..3ae4215f0348 100644 --- a/test/integration/filters/add_trailers_filter.cc +++ b/test/integration/filters/add_trailers_filter.cc @@ -42,8 +42,9 @@ class AddTrailersStreamFilterConfig }; // perform static registration +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace Envoy diff --git a/test/integration/filters/headers_only_filter.cc b/test/integration/filters/headers_only_filter.cc index 242cea3496c7..8f5400c479dd 100644 --- a/test/integration/filters/headers_only_filter.cc +++ b/test/integration/filters/headers_only_filter.cc @@ -21,9 +21,10 @@ class HeaderOnlyDecoderFilter : public Http::PassThroughFilter { }; constexpr char HeaderOnlyDecoderFilter::name[]; +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory, Server::Configuration::NamedHttpFilterConfigFactory> - decoder_register_; // NOLINT(fuchsia-statically-constructed-objects) + decoder_register_; class HeaderOnlyEncoderFilter : public Http::PassThroughFilter { public: @@ -36,7 +37,8 @@ class HeaderOnlyEncoderFilter : public Http::PassThroughFilter { constexpr char HeaderOnlyEncoderFilter::name[]; +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory, Server::Configuration::NamedHttpFilterConfigFactory> - encoder_register_; // NOLINT(fuchsia-statically-constructed-objects) + encoder_register_; } // namespace Envoy diff --git a/test/integration/filters/passthrough_filter.cc b/test/integration/filters/passthrough_filter.cc index c8101c978b2e..6702854a150a 100644 --- a/test/integration/filters/passthrough_filter.cc +++ b/test/integration/filters/passthrough_filter.cc @@ -15,8 +15,9 @@ class TestPassThroughFilter : public Http::PassThroughFilter { }; constexpr char TestPassThroughFilter::name[]; +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory, Server::Configuration::NamedHttpFilterConfigFactory> - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace Envoy diff --git a/test/integration/filters/pause_filter.cc b/test/integration/filters/pause_filter.cc index fef578171549..1985879575aa 100644 --- a/test/integration/filters/pause_filter.cc +++ b/test/integration/filters/pause_filter.cc @@ -78,8 +78,9 @@ class TestPauseFilterConfig : public Extensions::HttpFilters::Common::EmptyHttpF }; // perform static registration +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace Envoy diff --git a/test/integration/filters/random_pause_filter.cc b/test/integration/filters/random_pause_filter.cc index ca10dcaa37be..3f645d1cc2e5 100644 --- a/test/integration/filters/random_pause_filter.cc +++ b/test/integration/filters/random_pause_filter.cc @@ -65,8 +65,9 @@ class RandomPauseFilterConfig : public Extensions::HttpFilters::Common::EmptyHtt }; // perform static registration +// NOLINTNEXTLINE(fuchsia-statically-constructed-objects) static Registry::RegisterFactory - register_; // NOLINT(fuchsia-statically-constructed-objects) + register_; } // namespace Envoy From b3669c0bbeee121e4dd42aadecccc3d3f27cabb6 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Tue, 15 Jan 2019 23:31:57 +0000 Subject: [PATCH 4/5] NOLINT in macro Signed-off-by: Lizan Zhou --- include/envoy/singleton/manager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/envoy/singleton/manager.h b/include/envoy/singleton/manager.h index 9721d9318ff8..228fafd131d9 100644 --- a/include/envoy/singleton/manager.h +++ b/include/envoy/singleton/manager.h @@ -45,7 +45,7 @@ template class RegistrationImpl : public Registration { */ #define SINGLETON_MANAGER_REGISTRATION(NAME) \ static constexpr char NAME##_singleton_name[] = #NAME "_singleton"; \ - static Envoy::Registry::RegisterFactory< \ + static Envoy::Registry::RegisterFactory< /* NOLINT(fuchsia-statically-constructed-objects) */ \ Envoy::Singleton::RegistrationImpl, Envoy::Singleton::Registration> \ NAME##_singleton_registered_; From 7fbf23de11ad9ceb06f783d60290bb06a655ae32 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 16 Jan 2019 06:34:52 +0000 Subject: [PATCH 5/5] fix format Signed-off-by: Lizan Zhou --- include/envoy/singleton/manager.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/envoy/singleton/manager.h b/include/envoy/singleton/manager.h index 228fafd131d9..529f7e7e65b4 100644 --- a/include/envoy/singleton/manager.h +++ b/include/envoy/singleton/manager.h @@ -45,9 +45,11 @@ template class RegistrationImpl : public Registration { */ #define SINGLETON_MANAGER_REGISTRATION(NAME) \ static constexpr char NAME##_singleton_name[] = #NAME "_singleton"; \ - static Envoy::Registry::RegisterFactory< /* NOLINT(fuchsia-statically-constructed-objects) */ \ - Envoy::Singleton::RegistrationImpl, Envoy::Singleton::Registration> \ - NAME##_singleton_registered_; + static Envoy::Registry:: \ + RegisterFactory, \ + Envoy::Singleton::Registration> \ + NAME##_singleton_registered_; #define SINGLETON_MANAGER_REGISTERED_NAME(NAME) NAME##_singleton_name